1 package org.simantics.db.layer0.request;
3 import org.simantics.db.ReadGraph;
4 import org.simantics.db.Resource;
5 import org.simantics.db.common.request.ResourceRead2;
6 import org.simantics.db.exception.DatabaseException;
7 import org.simantics.user.UserResource;
9 public class IsUserInGroup extends ResourceRead2<Boolean> {
11 public IsUserInGroup(Resource user, Resource group) {
16 public Boolean perform(ReadGraph graph) throws DatabaseException {
17 UserResource USER = UserResource.getInstance(graph);
18 if(resource.equals(resource2)) return true;
19 for(Resource part : graph.getObjects(resource2, USER.Group_Contains)) {
20 if(graph.syncRequest(new IsUserInGroup(resource, part))) return true;