Package java.security.acl

Examples of java.security.acl.Group.members()


                  if (isSynchronizeRoles())
                  {

                     //based on code implementation its just one SimpleGroup called "Roles"
                     Group roleGroup = group[0];
                     Enumeration en = roleGroup.members();
                     while (en.hasMoreElements())
                     {
                        Principal p = (Principal)en.nextElement();
                        String roleName = p.getName();
                        log.debug("$$Processing role principal object related to current user: " + roleName);
View Full Code Here


      {
         for (int i = 0; i < group.length; i++)
         {
            Group group1 = group[i];
            log.debug("$$Role Group: " + group1.getName());
            Enumeration xx = group1.members();
            while (xx.hasMoreElements())
            {
               Principal o = (Principal)xx.nextElement();
               log.debug("$$Principal in group: " + o.getName() + "; " + o.toString());
View Full Code Here

                  if (isSynchronizeRoles())
                  {

                     //based on code implementation its just one SimpleGroup called "Roles"
                     Group roleGroup = group[0];
                     Enumeration en = roleGroup.members();
                     while (en.hasMoreElements())
                     {
                        Principal p = (Principal)en.nextElement();
                        String roleName = p.getName();
                        log.debug("$$Processing role principal object related to current user: " + roleName);
View Full Code Here

                        principal = p;
                    }
                    if (p instanceof Group) {
                        Group g = Group.class.cast(p);
                        if (g.getName().equals(SecurityConstants.CALLER_PRINCIPAL_GROUP) && callerPrincipal == null) {
                            Enumeration<? extends Principal> e = g.members();
                            if (e.hasMoreElements())
                                callerPrincipal = e.nextElement();
                        }
                    }
                }
View Full Code Here

        if (subject != null) {
            outerLoop : for (Principal principal : subject.getPrincipals()) {
                if (principal instanceof Group) {
                    Group group = (Group)principal;
                    if (group.getName().equalsIgnoreCase(CALLER_PRINCIPAL)) {
                        Enumeration<? extends Principal> members = group.members();
                        while (members.hasMoreElements()) {
                            callerPrincipal = members.nextElement();
                            break outerLoop;
                        }
                    }
View Full Code Here

        if (subject != null) {
            for (Principal principal : subject.getPrincipals()) {
                if (principal instanceof Group) {
                    Group group = (Group)principal;
                    if (group.getName().equalsIgnoreCase(ROLES)) {
                        Enumeration<? extends Principal> roles = group.members();
                        while (roles.hasMoreElements()) {
                            Principal role = roles.nextElement();
                            if (role.getName().equals(roleName)) {
                                return true;
                            }
View Full Code Here

            }
            // Same as Jboss - that's a pretty clean solution
            if( (principal instanceof Group) &&
                 "Roles".equals( principal.getName())) {
                Group grp=(Group)principal;
                Enumeration en=grp.members();
                while( en.hasMoreElements() ) {
                    Principal roleP=(Principal)en.nextElement();
                    roles.add( roleP.getName());
                }
View Full Code Here

        IndexEnumeration()
        {
            if( rolesStack.size() > 0 )
            {
                Group grp = (Group) rolesStack.get(0);
                iter = grp.members();
            }
        }
        public boolean hasMoreElements()
        {
            boolean hasMore = iter != null && iter.hasMoreElements();
View Full Code Here

        IndexEnumeration()
        {
            if( rolesStack.size() > 0 )
            {
                Group grp = (Group) rolesStack.get(0);
                iter = grp.members();
            }
        }
        public boolean hasMoreElements()
        {
            boolean hasMore = iter != null && iter.hasMoreElements();
View Full Code Here

            }
            // Same as Jboss - that's a pretty clean solution
            if( (principal instanceof Group) &&
                 "Roles".equals( principal.getName())) {
                Group grp=(Group)principal;
                Enumeration en=grp.members();
                while( en.hasMoreElements() ) {
                    Principal roleP=(Principal)en.nextElement();
                    roles.add( roleP.getName());
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.