diff options
author | Greg Wilkins | 2009-04-15 12:39:05 +0000 |
---|---|---|
committer | Greg Wilkins | 2009-04-15 12:39:05 +0000 |
commit | 3a129bb90f6e025d1905aeaa79a8972282105690 (patch) | |
tree | 37b76598473cac02ebdad48273587723c603e750 /jetty-security/src/main/java/org/eclipse/jetty/security/RoleInfo.java | |
parent | 5e117960313adf03f5b29b718465206dc4735c19 (diff) | |
download | org.eclipse.jetty.project-3a129bb90f6e025d1905aeaa79a8972282105690.tar.gz org.eclipse.jetty.project-3a129bb90f6e025d1905aeaa79a8972282105690.tar.xz org.eclipse.jetty.project-3a129bb90f6e025d1905aeaa79a8972282105690.zip |
reworked the Authentication to better support lazyness and to move towards servlet 3.0 login and logout
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@151 7e9141cc-0065-0410-87d8-b60c137991c4
Diffstat (limited to 'jetty-security/src/main/java/org/eclipse/jetty/security/RoleInfo.java')
-rw-r--r-- | jetty-security/src/main/java/org/eclipse/jetty/security/RoleInfo.java | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/jetty-security/src/main/java/org/eclipse/jetty/security/RoleInfo.java b/jetty-security/src/main/java/org/eclipse/jetty/security/RoleInfo.java index d4d687f51c..b58558f70d 100644 --- a/jetty-security/src/main/java/org/eclipse/jetty/security/RoleInfo.java +++ b/jetty-security/src/main/java/org/eclipse/jetty/security/RoleInfo.java @@ -29,21 +29,25 @@ public class RoleInfo { private final static String[] NO_ROLES={}; private boolean _isAnyRole; - private boolean _unchecked; + private boolean _checked; private boolean _forbidden; private UserDataConstraint _userDataConstraint; private String[] _roles = NO_ROLES; - public boolean isUnchecked() + public RoleInfo() + { + } + + public boolean isChecked() { - return _unchecked; + return _checked; } - public void setUnchecked(boolean unchecked) + public void setChecked(boolean checked) { - this._unchecked = unchecked; - if (unchecked) + this._checked = checked; + if (!checked) { _forbidden=false; _roles=NO_ROLES; @@ -61,7 +65,7 @@ public class RoleInfo this._forbidden = forbidden; if (forbidden) { - _unchecked = false; + _checked = true; _userDataConstraint = null; _isAnyRole=false; _roles=NO_ROLES; @@ -78,7 +82,7 @@ public class RoleInfo this._isAnyRole=anyRole; if (anyRole) { - _unchecked = false; + _checked = true; _roles=NO_ROLES; } } @@ -115,8 +119,8 @@ public class RoleInfo { if (other._forbidden) setForbidden(true); - else if (other._unchecked) - setUnchecked(true); + else if (!other._checked) // TODO is this the right way around??? + setChecked(true); else if (other._isAnyRole) setAnyRole(true); else if (!_isAnyRole) @@ -130,6 +134,6 @@ public class RoleInfo public String toString() { - return "{RoleInfo"+(_forbidden?",F":"")+(_unchecked?",U":"")+(_isAnyRole?",*":Arrays.asList(_roles).toString())+"}"; + return "{RoleInfo"+(_forbidden?",F":"")+(_checked?",C":"")+(_isAnyRole?",*":Arrays.asList(_roles).toString())+"}"; } } |