Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
fusiondirectory
fusiondirectory
Commits
3f1fc9cc
Commit
3f1fc9cc
authored
Jun 24, 2013
by
Côme Bernigaud
Committed by
Benoit Mortier
Sep 16, 2013
Browse files
Fixes: #2407 fixed PHP error in acl removing
parent
5bb65646
Changes
1
Hide whitespace changes
Inline
Side-by-side
include/class_acl.inc
View file @
3f1fc9cc
...
...
@@ -68,7 +68,7 @@ class acl extends plugin
function
acl
(
&
$config
,
$dn
=
NULL
,
$baseobject
=
NULL
)
{
/* Include config object */
p
lugin
::
plugin
(
$config
,
$dn
,
$baseobject
);
p
arent
::
__construct
(
$config
,
$dn
,
$baseobject
);
/* Load ACL's */
$this
->
gosaAclEntry
=
array
();
...
...
@@ -1214,27 +1214,27 @@ class acl extends plugin
}
/* Remove object class */
$this
->
attrs
[
'objectClass'
]
=
array_remove_entries
(
array
(
'gosaAcl'
),
$this
->
attrs
[
'objectClass'
]);
$this
->
attrs
[
'objectClass'
]
=
array_remove_entries
(
array
(
'gosaAcl'
),
$this
->
attrs
[
'objectClass'
]);
}
/* Do LDAP modifications */
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
->
cd
(
$this
->
dn
);
$this
->
cleanup
();
$ldap
->
modify
(
$this
->
attrs
);
if
(
count
(
$this
->
attrs
)){
new
log
(
"modify"
,
"acls/"
.
get_class
(
$this
),
$this
->
dn
,
array_keys
(
$this
->
attrs
),
$ldap
->
get_error
());
if
(
count
(
$this
->
attrs
))
{
new
log
(
"modify"
,
"acls/"
.
get_class
(
$this
),
$this
->
dn
,
array_keys
(
$this
->
attrs
),
$ldap
->
get_error
());
}
if
(
!
$ldap
->
success
()){
if
(
!
$ldap
->
success
())
{
msg_dialog
::
display
(
_
(
"LDAP error"
),
msgPool
::
ldaperror
(
$ldap
->
get_error
(),
$this
->
dn
,
LDAP_MOD
,
get_class
()),
ERROR_DIALOG
);
}
/* Refresh users ACLs */
$ui
=
get_userinfo
();
$ui
=
get_userinfo
();
$ui
->
loadACL
();
session
::
global_set
(
'ui'
,
$ui
);
session
::
global_set
(
'ui'
,
$ui
);
}
/*!
...
...
@@ -1242,19 +1242,19 @@ class acl extends plugin
*/
function
remove_from_parent
()
{
p
lugin
::
remove_from_parent
();
p
arent
::
remove_from_parent
();
/* include global link_info */
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
=
$this
->
config
->
get_ldap_link
();
$ldap
->
cd
(
$this
->
dn
);
$this
->
cleanup
();
$ldap
->
modify
(
$this
->
attrs
);
$ldap
->
modify
(
$this
->
attrs
);
new
log
(
"
remove
"
,
"
acls/
"
.
get_class
(
$this
),
$this
->
dn
,
array_keys
(
$this
->
attrs
),
$ldap
->
get_error
());
new
log
(
'
remove
'
,
'
acls/
'
.
get_class
(
$this
),
$this
->
dn
,
array_keys
(
$this
->
attrs
),
$ldap
->
get_error
());
/* Optionally execute a command after we're done */
$this
->
handle_post_events
(
"
remove
"
,
array
(
"uid"
=>
$this
->
uid
)
);
$this
->
handle_post_events
(
'
remove
'
);
}
...
...
Côme Chilliet
@cchilliet
mentioned in issue
#808 (closed)
·
Sep 02, 2017
mentioned in issue
#808 (closed)
mentioned in issue #808
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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