Alon Bar-Lev has posted comments on this change.

Change subject: aaa: reactivate user
......................................................................


Patch Set 2:

(2 comments)

http://gerrit.ovirt.org/#/c/29974/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DbUserCacheManager.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/DbUserCacheManager.java:

Line 51:      * Load all the users from the database and refresh them.
Line 52:      */
Line 53:     @OnTimerMethodAnnotation("refreshAllUsers")
Line 54:     public void refreshAllUsers() {
Line 55:         SyncUsers.sync(DbFacade.getInstance().getDbUserDao().getAll(), 
"The user was reactivated during periodic sync");
I truly hope that getAll() does not fetch inactive users, so no need for any 
farther action... if not, you should filter the inactive from the getAll()
Line 56:     }
Line 57: 


http://gerrit.ovirt.org/#/c/29974/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SyncUsers.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/SyncUsers.java:

Line 63:                     if (activeUser != null) {
Line 64:                         if (!activeUser.equals(dbUser)) {
Line 65:                             if (!dbUser.isActive()) {
Line 66:                                 log.info(String.format("The user %1$s 
from authz extension %2$s will become active. Activation reason: %3$s", 
dbUser.getLoginName(), dbUser.getDomain(), activateReason));
Line 67:                             }
not sure why we need this message in log... it is kinda obvious that it will be 
so as the add user will fail with "The user from authz... could not be found 
and will be marked as inactive, if something fails. and on periodic sync it 
will never happen as we provide only active user.
Line 68:                             activeUser.setId(dbUser.getId());
Line 69:                             log.info(String.format("The user %1$s from 
authz extension %2$s got updated since last interval",
Line 70:                                     activeUser.getLoginName(),
Line 71:                                     activeUser.getDomain()));


-- 
To view, visit http://gerrit.ovirt.org/29974
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I556d8da48a858ce193865e84fb6c7cb4043a8e5b
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to