Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ac
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
OATS-CADC
ac
Commits
d90c2ce8
Commit
d90c2ce8
authored
9 years ago
by
Brian Major
Browse files
Options
Downloads
Patches
Plain Diff
s1890 - A user is consistent with another if they are equals
parent
4e2c695c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cadcAccessControl/src/ca/nrc/cadc/ac/User.java
+9
-10
9 additions, 10 deletions
cadcAccessControl/src/ca/nrc/cadc/ac/User.java
with
9 additions
and
10 deletions
cadcAccessControl/src/ca/nrc/cadc/ac/User.java
+
9
−
10
View file @
d90c2ce8
...
@@ -68,8 +68,6 @@
...
@@ -68,8 +68,6 @@
*/
*/
package
ca.nrc.cadc.ac
;
package
ca.nrc.cadc.ac
;
import
ca.nrc.cadc.auth.HttpPrincipal
;
import
java.security.Principal
;
import
java.security.Principal
;
import
java.util.Comparator
;
import
java.util.Comparator
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -77,6 +75,8 @@ import java.util.HashSet;
...
@@ -77,6 +75,8 @@ import java.util.HashSet;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.TreeSet
;
import
java.util.TreeSet
;
import
ca.nrc.cadc.auth.HttpPrincipal
;
public
class
User
public
class
User
{
{
private
InternalID
id
;
private
InternalID
id
;
...
@@ -155,23 +155,22 @@ public class User
...
@@ -155,23 +155,22 @@ public class User
return
false
;
return
false
;
}
}
if
(
this
.
equals
(
other
))
{
return
true
;
}
for
(
Principal
identity:
getIdentities
())
for
(
Principal
identity:
getIdentities
())
{
{
boolean
found
=
false
;
for
(
Principal
op:
other
.
getIdentities
())
for
(
Principal
op:
other
.
getIdentities
())
{
{
if
(
op
.
equals
(
identity
))
if
(
op
.
equals
(
identity
))
{
{
found
=
true
;
return
true
;
break
;
}
}
}
}
if
(!
found
)
{
return
false
;
}
}
}
return
false
;
return
true
;
}
}
/* (non-Javadoc)
/* (non-Javadoc)
...
...
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