Package de.iritgo.aktera.permissions.security

Examples of de.iritgo.aktera.permissions.security.Group


    try
    {
      for (AkteraGroup akteraGroup : userDAO.findGroupsByUser(akteraUser))
      {
        String groupName = akteraGroup.getName();
        Group group = (Group) groups.get(groupName);
        if (group == null)
        {
          group = new Group(groupName);
          groups.put(groupName, group);

          for (Permission permissionEntity : permissionDAO.findGroupPermissions(akteraGroup))
          {
            Tuple2 aclKey = new Tuple2(permissionEntity.getObjectType() != null ? permissionEntity
                    .getObjectType() : GLOBAL_OBJECT_TYPE, permissionEntity.getObjectId());
            Acl acl = aclByDomainObject.get(aclKey);
            if (acl == null)
            {
              acl = new Acl(ROOT, ROOT_NAME);
              aclByDomainObject.put(aclKey, acl);
            }
            AclEntry aclEntry = acl.findAclEntry(group, permissionEntity.getNegative());
            if (aclEntry == null)
            {
              aclEntry = new AclEntry(group);
              if (permissionEntity.getNegative())
              {
                aclEntry.setNegativePermissions();
              }
              acl.addEntry(ROOT, aclEntry);
            }
            aclEntry.addPermission(new SimplePermission(permissionEntity.getPermission()));
          }
        }

        if (! group.isMember(principal))
        {
          group.addMember(principal);
        }
      }

      for (Permission permissionEntity : permissionDAO.findUserPermissions(akteraUser))
      {
View Full Code Here

TOP

Related Classes of de.iritgo.aktera.permissions.security.Group

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.