Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
fusiondirectory
fusiondirectory
Commits
2394ef23
Verified
Commit
2394ef23
authored
7 months ago
by
dockx thibault
Browse files
Options
Download
Patches
Plain Diff
(CORE) - add logging when user is locked
Fixing code style.
parent
13ded56b
dev
6344-template-issue-when-creating-a-template-with-empty-password-error-message-should-not-be-seen
6365-core-locking-mechanism-is-not-changing-the-mail-ressource-it-does-lock-the-mail-account
6365-core-when-lock-mechanism-is-trigger-the-user-should-not-be-editable-if-not-unlock
core-php8
master
fusiondirectory-1.5
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
plugins/management/users/class_userManagement.inc
+21
-20
plugins/management/users/class_userManagement.inc
with
21 additions
and
20 deletions
+21
-20
plugins/management/users/class_userManagement.inc
+
21
−
20
View file @
2394ef23
...
...
@@ -25,14 +25,15 @@ class userManagement extends management
public
static
$skipTemplates
=
FALSE
;
public
static
$columns
=
[
[
'ObjectTypeColumn'
,
[]],
[
'LinkColumn'
,
[
'attributes'
=>
'sn'
,
'label'
=>
'Last name'
]],
[
'LinkColumn'
,
[
'attributes'
=>
'givenName'
,
'label'
=>
'First name'
]],
[
'Column'
,
[
'attributes'
=>
'uid'
,
'label'
=>
'Login'
]],
[
'PropertiesColumn'
,
[
'label'
=>
'Properties'
]],
[
'ActionsColumn'
,
[
'label'
=>
'Actions'
]],
];
public
static
$columns
=
[
[
'ObjectTypeColumn'
,
[]],
[
'LinkColumn'
,
[
'attributes'
=>
'sn'
,
'label'
=>
'Last name'
]],
[
'LinkColumn'
,
[
'attributes'
=>
'givenName'
,
'label'
=>
'First name'
]],
[
'Column'
,
[
'attributes'
=>
'uid'
,
'label'
=>
'Login'
]],
[
'PropertiesColumn'
,
[
'label'
=>
'Properties'
]],
[
'ActionsColumn'
,
[
'label'
=>
'Actions'
]],
];
static
function
plInfo
():
array
{
...
...
@@ -117,10 +118,10 @@ class userManagement extends management
}
$error
=
new
FusionDirectoryError
(
htmlescape
(
sprintf
(
_
(
'Password method "%s" does not support locking. Account "%s" has not been locked!'
),
$hn
,
$dn
))
_
(
'Password method "%s" does not support locking. Account "%s" has not been locked!'
),
$hn
,
$dn
))
);
$error
->
display
();
return
;
...
...
@@ -130,14 +131,14 @@ class userManagement extends management
if
((
$action
==
'lock'
)
&&
!
$method
->
is_locked
(
$dn
))
{
$success
=
$method
->
lock_account
(
$dn
);
// Requiring logging mechanism for audit.
if
(
$success
)
{
logging
::
log
(
'security'
,
'account'
,
$dn
,
[],
'DN : '
.
$dn
.
' is locked.'
);
if
(
$success
)
{
logging
::
log
(
'security'
,
'account'
,
$dn
,
[],
'DN : '
.
$dn
.
' is locked.'
);
}
}
elseif
((
$action
==
'unlock'
)
&&
$method
->
is_locked
(
$dn
))
{
$success
=
$method
->
unlock_account
(
$dn
);
// Requiring logging mechanism for audit.
if
(
$success
)
{
logging
::
log
(
'security'
,
'account'
,
$dn
,
[],
'DN : '
.
$dn
.
' is unlocked.'
);
if
(
$success
)
{
logging
::
log
(
'security'
,
'account'
,
$dn
,
[],
'DN : '
.
$dn
.
' is unlocked.'
);
}
}
...
...
@@ -149,10 +150,10 @@ class userManagement extends management
}
$error
=
new
FusionDirectoryError
(
htmlescape
(
sprintf
(
_
(
'Locking failed using password method "%s". Account "%s" has not been locked!'
),
$hn
,
$dn
))
_
(
'Locking failed using password method "%s". Account "%s" has not been locked!'
),
$hn
,
$dn
))
);
$error
->
display
();
}
...
...
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets