Loading projects/cadcUtil/doc/uml/UserAuth.png +728 B (16.8 KiB) Loading image diff... projects/cadcUtil/src/ca/nrc/cadc/auth/model/Group.java +8 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ public class Group * Ctor. * * @param groupID * Unique ID for the group * Unique ID for the group. Must be a valid URI fragment component, * so it's restricted to alphanumeric and "-", ".","_","~" characters. * @param owner * Owner/Creator of the group. */ Loading @@ -87,6 +88,12 @@ public class Group { throw new IllegalArgumentException("Null groupID"); } // check for invalid path characters in groupID if(!groupID.matches("^[a-zA-Z0-9\\-\\.~_]*$")) throw new IllegalArgumentException("Invalid group ID " + groupID + ": may not contain space ( ), slash (/), escape (\\), or percent (%)"); this.groupID = groupID; if(owner == null) { Loading projects/cadcUtil/src/ca/nrc/cadc/auth/model/GroupProperty.java +1 −23 Original line number Diff line number Diff line Loading @@ -140,9 +140,6 @@ public class GroupProperty final int prime = 31; int result = 1; result = prime * result + ((key == null) ? 0 : key.hashCode()); result = prime * result + (readOnly ? 1231 : 1237); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; } Loading @@ -165,26 +162,7 @@ public class GroupProperty return false; } GroupProperty other = (GroupProperty) obj; if (key == null) { if (other.key != null) { return false; } } else if (!key.equals(other.key)) { return false; } if (readOnly != other.readOnly) { return false; } if (!value.equals(other.value)) { return false; } return true; return key.equals(other.key); } @Override Loading projects/cadcUtil/src/ca/nrc/cadc/auth/model/PosixDetails.java +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ package ca.nrc.cadc.auth.model; /** * Represents the posix account details associated with a user account. */ public class PosixDetails public class PosixDetails implements UserDetails { private long uid; private long gid; Loading projects/cadcUtil/src/ca/nrc/cadc/auth/model/User.java +2 −4 Original line number Diff line number Diff line Loading @@ -46,8 +46,7 @@ public class User<T extends Principal> private Set<Principal> principals = new HashSet<Principal>(); public UserDetails userDetails; public PosixDetails posixDetails; public Set<UserDetails> details = new HashSet<UserDetails>(); public User(final T userID) Loading Loading @@ -79,8 +78,7 @@ public class User<T extends Principal> { final int prime = 31; int result = 1; result = prime * result + ((userID == null) ? 0 : userID.hashCode()); result = prime * result + userID.hashCode(); return result; } Loading Loading
projects/cadcUtil/src/ca/nrc/cadc/auth/model/Group.java +8 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ public class Group * Ctor. * * @param groupID * Unique ID for the group * Unique ID for the group. Must be a valid URI fragment component, * so it's restricted to alphanumeric and "-", ".","_","~" characters. * @param owner * Owner/Creator of the group. */ Loading @@ -87,6 +88,12 @@ public class Group { throw new IllegalArgumentException("Null groupID"); } // check for invalid path characters in groupID if(!groupID.matches("^[a-zA-Z0-9\\-\\.~_]*$")) throw new IllegalArgumentException("Invalid group ID " + groupID + ": may not contain space ( ), slash (/), escape (\\), or percent (%)"); this.groupID = groupID; if(owner == null) { Loading
projects/cadcUtil/src/ca/nrc/cadc/auth/model/GroupProperty.java +1 −23 Original line number Diff line number Diff line Loading @@ -140,9 +140,6 @@ public class GroupProperty final int prime = 31; int result = 1; result = prime * result + ((key == null) ? 0 : key.hashCode()); result = prime * result + (readOnly ? 1231 : 1237); result = prime * result + ((value == null) ? 0 : value.hashCode()); return result; } Loading @@ -165,26 +162,7 @@ public class GroupProperty return false; } GroupProperty other = (GroupProperty) obj; if (key == null) { if (other.key != null) { return false; } } else if (!key.equals(other.key)) { return false; } if (readOnly != other.readOnly) { return false; } if (!value.equals(other.value)) { return false; } return true; return key.equals(other.key); } @Override Loading
projects/cadcUtil/src/ca/nrc/cadc/auth/model/PosixDetails.java +1 −1 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ package ca.nrc.cadc.auth.model; /** * Represents the posix account details associated with a user account. */ public class PosixDetails public class PosixDetails implements UserDetails { private long uid; private long gid; Loading
projects/cadcUtil/src/ca/nrc/cadc/auth/model/User.java +2 −4 Original line number Diff line number Diff line Loading @@ -46,8 +46,7 @@ public class User<T extends Principal> private Set<Principal> principals = new HashSet<Principal>(); public UserDetails userDetails; public PosixDetails posixDetails; public Set<UserDetails> details = new HashSet<UserDetails>(); public User(final T userID) Loading Loading @@ -79,8 +78,7 @@ public class User<T extends Principal> { final int prime = 31; int result = 1; result = prime * result + ((userID == null) ? 0 : userID.hashCode()); result = prime * result + userID.hashCode(); return result; } Loading