diff src/main/java/de/mpiwg/itgroup/annotations/Actor.java @ 88:b406507a953d

upped version to 0.5. can use display name and groups from auth token.
author casties
date Tue, 03 Feb 2015 19:01:27 +0100
parents 2b1e6df5e21a
children f83eb8b335b1
line wrap: on
line diff
--- a/src/main/java/de/mpiwg/itgroup/annotations/Actor.java	Tue Feb 03 11:33:45 2015 +0100
+++ b/src/main/java/de/mpiwg/itgroup/annotations/Actor.java	Tue Feb 03 19:01:27 2015 +0100
@@ -57,6 +57,13 @@
         if (person.getIdString().equals(this.getIdString())) return true;
         if (isGroup() && store != null) {
             // check if person in group
+            if (person.groups != null) {
+                // check person's groups
+                if (person.groups.contains(this.id)) {
+                    return true;
+                }
+            }
+            // check in store
             return store.isPersonInGroup(person, (Group) this);            
         }
         return false;