Yair Zaslavsky has posted comments on this change.

Change subject: aaa: Added usage of AuthRecord.VALID_TO
......................................................................


Patch Set 4:

(3 comments)

http://gerrit.ovirt.org/#/c/26975/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/LoginBaseCommand.java:

Line 108:         return result;
Line 109:     }
Line 110: 
Line 111:     protected boolean attachUserToSession() {
Line 112:         Date validTo = null;
> you do not need validTo temp var here.
Done
Line 113:         if (!StringUtils.isEmpty(getParameters().getSessionId())) {
Line 114:             validTo = SessionDataContainer.getInstance()
Line 115:                     .getValidTo(getParameters().getSessionId());
Line 116:             if (validTo.compareTo(new 
Date(System.currentTimeMillis())) < 0) {


Line 112:         Date validTo = null;
Line 113:         if (!StringUtils.isEmpty(getParameters().getSessionId())) {
Line 114:             validTo = SessionDataContainer.getInstance()
Line 115:                     .getValidTo(getParameters().getSessionId());
Line 116:             if (validTo.compareTo(new 
Date(System.currentTimeMillis())) < 0) {
> please remind my why not new Date() ?
Done
Line 117:                 
SessionDataContainer.getInstance().removeSession(getParameters().getSessionId());
Line 118:                 return 
failCanDoAction(VdcBllMessages.USER_CANNOT_LOGIN_SESSION_MISSING);
Line 119:             }
Line 120:             
SessionDataContainer.getInstance().setUser(getParameters().getSessionId(), 
getCurrentUser());


Line 126:                     DateUtils.addMinutes(new Date(), Config.<Integer> 
getValue(ConfigValues.UserSessionTimeOutInterval));
Line 127:             try {
Line 128:                 Date fromExtension =
Line 129:                         new SimpleDateFormat("yyyy-MM-dd 
HH:mm:ssZ").parse(authRecord.<String> get(AuthRecord.VALID_TO));
Line 130:                 validTo = validTo.compareTo(fromExtension) < 0 ? 
validTo : fromExtension;
> that's ok.
if engine sets valid to - how it is passed to the provider? i thought it's the 
responsible of the provider to set the value of valid_to.
Line 131:             } catch (ParseException e) {
Line 132:                 log.warn("Error parsing AuthRecord.VALID_TO . Default 
VALID_TO value will be set on session");
Line 133:             }
Line 134:             SessionDataContainer.getInstance().setValidTo(validTo);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I53e4a371c1bae8d2480ddd2af921a560c6fe9a85
Gerrit-PatchSet: 4
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