Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
24fde58d
"README.md" did not exist on "7b3f82a3db3d36699c3022a6b5e6ad7c9d455805"
Commit
24fde58d
authored
6 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-3447: filter the permanent user in the delete process of the LDAP administration
parent
f6f5409e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/org/olat/ldap/manager/LDAPLoginManagerImpl.java
+5
-0
5 additions, 0 deletions
...main/java/org/olat/ldap/manager/LDAPLoginManagerImpl.java
src/main/java/org/olat/ldap/ui/LDAPAdminController.java
+11
-0
11 additions, 0 deletions
src/main/java/org/olat/ldap/ui/LDAPAdminController.java
with
16 additions
and
0 deletions
src/main/java/org/olat/ldap/manager/LDAPLoginManagerImpl.java
+
5
−
0
View file @
24fde58d
...
...
@@ -432,6 +432,11 @@ public class LDAPLoginManagerImpl implements LDAPLoginManager, GenericEventListe
SecurityGroup
secGroup
=
securityManager
.
findSecurityGroupByName
(
LDAPConstants
.
SECURITY_GROUP_LDAP
);
for
(
Identity
identity:
identityList
)
{
if
(
Identity
.
STATUS_PERMANENT
.
equals
(
identity
.
getStatus
()))
{
log
.
audit
(
identity
.
getKey
()
+
" was not deleted because is status is permanent."
);
continue
;
}
securityManager
.
removeIdentityFromSecurityGroup
(
identity
,
secGroup
);
userDeletionManager
.
deleteIdentity
(
identity
);
dbInstance
.
intermediateCommit
();
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/olat/ldap/ui/LDAPAdminController.java
+
11
−
0
View file @
24fde58d
...
...
@@ -21,6 +21,7 @@ package org.olat.ldap.ui;
import
java.text.DateFormat
;
import
java.util.Date
;
import
java.util.Iterator
;
import
java.util.List
;
import
javax.naming.NamingException
;
...
...
@@ -174,6 +175,15 @@ public class LDAPAdminController extends BasicController implements GenericEvent
showError
(
"delete.error.connection.close"
);
logError
(
"Could not close LDAP connection on manual delete sync"
,
e
);
}
if
(
identitiesToDelete
!=
null
)
{
for
(
Iterator
<
Identity
>
it
=
identitiesToDelete
.
iterator
();
it
.
hasNext
();
)
{
if
(
Identity
.
STATUS_PERMANENT
.
equals
(
it
.
next
().
getStatus
()))
{
it
.
remove
();
}
}
}
if
(
identitiesToDelete
!=
null
&&
identitiesToDelete
.
size
()
!=
0
)
{
hasIdentitiesToDelete
=
true
;
/*
...
...
@@ -184,6 +194,7 @@ public class LDAPAdminController extends BasicController implements GenericEvent
* wizard finish callback called after "finish" is called
*/
StepRunnerCallback
finishCallback
=
new
StepRunnerCallback
()
{
@Override
public
Step
execute
(
UserRequest
uureq
,
WindowControl
control
,
StepsRunContext
runContext
)
{
hasIdentitiesToDeleteAfterRun
=
((
Boolean
)
runContext
.
get
(
"hasIdentitiesToDelete"
)).
booleanValue
();
if
(
hasIdentitiesToDeleteAfterRun
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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