Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Julien Ledoux
lemonldap-ng
Commits
3134ed8c
Commit
3134ed8c
authored
Aug 29, 2018
by
Clément OUDOT
Browse files
Fix for addKey and manage delKey (#1494)
parent
c8ce3344
Changes
1
Hide whitespace changes
Inline
Side-by-side
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm
View file @
3134ed8c
...
...
@@ -107,8 +107,8 @@ sub addKey {
$el
->
[
2
];
}
elsif
(
$#path
==
3
)
{
$new
->
{
$path
[
0
]
}
->
{
$path
[
1
]
}
->
{
$path
[
2
]
}
->
{
$path
[
3
]
}{
$el
->
[
1
]
}
=
$el
->
[
2
];
$new
->
{
$path
[
0
]
}
->
{
$path
[
1
]
}
->
{
$path
[
2
]
}
->
{
$path
[
3
]
}
->
{
$el
->
[
1
]
}
=
$el
->
[
2
];
}
else
{
die
$el
->
[
0
]
.
"
has too many levels. Aborting
";
...
...
@@ -142,6 +142,13 @@ sub delKey {
elsif
(
$#path
==
1
)
{
delete
$new
->
{
$path
[
0
]
}
->
{
$path
[
1
]
}
->
{
$el
->
[
1
]
};
}
elsif
(
$#path
==
2
)
{
delete
$new
->
{
$path
[
0
]
}
->
{
$path
[
1
]
}
->
{
$path
[
2
]
}
->
{
$el
->
[
1
]
};
}
elsif
(
$#path
==
3
)
{
delete
$new
->
{
$path
[
0
]
}
->
{
$path
[
1
]
}
->
{
$path
[
2
]
}
->
{
$path
[
3
]
}
->
{
$el
->
[
1
]
};
}
else
{
die
$el
->
[
0
]
.
"
has too many levels. Aborting
";
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment