Examples of Role


Examples of org.apache.archiva.redback.rbac.Role

    @Override
    public Role getRole( String roleName )
        throws RbacObjectNotFoundException, RbacManagerException
    {

        Role el = rolesCache.get( roleName );
        if ( el != null )
        {
            return el;
        }

        Exception lastException = null;
        for ( RBACManager rbacManager : rbacManagersPerId.values() )
        {
            try
            {
                Role role = rbacManager.getRole( roleName );
                if ( role != null )
                {
                    rolesCache.put( role.getName(), role );
                    return role;
                }
            }
            catch ( Exception e )
            {
View Full Code Here

Examples of org.apache.beehive.wsm.axis.security.Role

            {
                for ( String groupName : role.getGroupArray() )
                {
                    if ( groupName.equals( group.getName() ) )
                    {
                        Role memoryRole = userList.getRole( role.getName() );
                        if ( memoryRole != null )
                        {
                            if (logger.isDebugEnabled()) {
                                logger.debug("GROUP : " + memoryGroup.getName() + " in ROLE : " + memoryRole.getName() );
                            }
                            memoryGroup.addRole ( memoryRole );
                        }
                    }
                }
            }
            userList.addGroup ( memoryGroup );
        }

        // constructs User.
        for( org.apache.beehive.wsm.axis.security.xmlbeans.User user : beehiveRole.getUserArray() )
        {
            MemoryUserImpl memoryUser = new MemoryUserImpl();
            memoryUser.setName ( user.getName() );
            memoryUser.setPassword ( user.getPassword() );
            memoryUser.setMd5 ( user.getMd5() );

            for ( org.apache.beehive.wsm.axis.security.xmlbeans.Group group : beehiveRole.getGroupArray() )
            {
                for ( String userName : group.getUserArray() )
                {
                    if ( userName.equals( user.getName() ) )
                    {
                        Group memoryGroup = userList.getGroup( group.getName() );
                        if ( memoryGroup != null )
                        {
                            if (logger.isDebugEnabled()) {
                                logger.debug("USER : " + memoryUser.getName() + " in GROUP : " + memoryGroup.getName() );
                            }

                            // User and Group hold references to each other
                            memoryGroup.addUser( memoryUser );
                            memoryUser.addGroup( memoryGroup );

                            // user inherits this group's roles.
                            for ( Role memoryRole : memoryGroup.getRoles() )
                            {
                                memoryUser.addRole ( memoryRole );
                            }

                        }
                    }
                }
            }


            for ( org.apache.beehive.wsm.axis.security.xmlbeans.Role role : beehiveRole.getRoleArray() )
            {
                for ( String userName : role.getUserArray() )
                {
                    if ( userName.equals( user.getName() ) )
                    {
                        Role memoryRole = userList.getRole( role.getName() );
                        if ( memoryRole != null )
                        {
                            if (logger.isDebugEnabled()) {
                                logger.debug("USER : " + memoryUser.getName() + " in ROLE : " + memoryRole.getName() );
                            }
                            memoryUser.addRole( memoryRole );
                        }
                    }
                }
View Full Code Here

Examples of org.apache.catalina.Role

                } else {
                    rolename = roles.trim();
                    roles = "";
                }
                if (rolename.length() > 0) {
                    Role role = database.findRole(rolename);
                    if (role == null) {
                        role = database.createRole(rolename, null);
                    }
                    group.addRole(role);
                }
View Full Code Here

Examples of org.apache.geronimo.jee.security.Role

        Description description = securityFactory.createDescription();
        description.setValue("security-subjectinfo-description");
        subject.getDescription().add(description);
        security.setDefaultSubject(subject);
        RoleMappings roleMappings = securityFactory.createRoleMappings();
        Role role = securityFactory.createRole();
        role.setRoleName("security-role");
        SubjectInfo subjectInfo = securityFactory.createSubjectInfo();
        subjectInfo.setId("security-role-subjectinfo-id");
        subjectInfo.setRealm("security-role-subjectinfo-realm");
        description = securityFactory.createDescription();
        description.setValue("security-role-subjectinfo-description");
        subjectInfo.getDescription().add(description);
        role.setRunAsSubject(subjectInfo);
        description = securityFactory.createDescription();
        description.setValue("security-role-description");
        role.getDescription().add(description);
        DistinguishedName distinguishedName = securityFactory.createDistinguishedName();
        distinguishedName.setName("security-role-distinguishedname");
        description = securityFactory.createDescription();
        description.setValue("security-role-distinguished-name-description");
        distinguishedName.getDescription().add(description);
        role.getDistinguishedName().add(distinguishedName);
        LoginDomainPrincipal loginDomainPrincipal = securityFactory.createLoginDomainPrincipal();
        loginDomainPrincipal.setDomainName("security-role-logindomainprincipal-domainname");
        loginDomainPrincipal.setName("security-role-logindomainprincipal-name");
        loginDomainPrincipal.setClazz("security-role-logindomainprincipal-class");
        description = securityFactory.createDescription();
        description.setValue("security-role-logindomainprincipal-description");
        loginDomainPrincipal.getDescription().add(description);
        role.getLoginDomainPrincipal().add(loginDomainPrincipal);
        Principal principal = securityFactory.createPrincipal();
        principal.setName("security-role-principal-name");
        principal.setClazz("security-role-principal-class");
        description = securityFactory.createDescription();
        description.setValue("security-role-principal-description");
        principal.getDescription().add(description);
        role.getPrincipal().add(principal);
        RealmPrincipal realmPrincipal = securityFactory.createRealmPrincipal();
        realmPrincipal.setName("security-role-realmprincipal-name");
        realmPrincipal.setClazz("security-role-realmprincipal-class");
        description = securityFactory.createDescription();
        description.setValue("security-role-realmprincipal-description");
        realmPrincipal.getDescription().add(description);
        role.getRealmPrincipal().add(realmPrincipal);
        roleMappings.getRole().add(role);
        security.setRoleMappings(roleMappings);
        webApp.setSecurity(securityFactory.createSecurity(security));

        JAXBElement<WebApp> jaxbElement = webFactory.createWebApp(webApp);
View Full Code Here

Examples of org.apache.geronimo.security.deploy.Role

        String securityRealmName = "demo-properties-realm";
        String defaultPrincipalId = "izumi";
        SubjectInfo defaultSubjectInfo = new SubjectInfo(securityRealmName, defaultPrincipalId);
        securityConfig.setDefaultSubjectInfo(defaultSubjectInfo);

        Role role = new Role();
        role.setRoleName("content-administrator");
        PrincipalInfo principalInfo = new PrincipalInfo("org.apache.geronimo.security.realm.providers.GeronimoGroupPrincipal", "it");
        role.getPrincipals().add(principalInfo);

        securityConfig.getRoleMappings().put(role.getRoleName(), role);

        Map roleDesignates = new HashMap();
        Map principalRoleMap = new HashMap();
        buildPrincipalRoleMap(securityConfig, roleDesignates, principalRoleMap);
View Full Code Here

Examples of org.apache.hadoop.hive.metastore.api.Role

  public Role getRole(String roleName) throws NoSuchObjectException {
    MRole mRole = this.getMRole(roleName);
    if (mRole == null) {
      throw new NoSuchObjectException(roleName + " role can not be found.");
    }
    Role ret = new Role(mRole.getRoleName(), mRole.getCreateTime(), mRole
        .getOwnerName());
    return ret;
  }
View Full Code Here

Examples of org.apache.isis.core.testsupport.testdomain.Role

        final Person person = new Person();
        person.setName("Fred Smith");
        person.setDate(new Date(110, 2, 8, 13, 32));
        final Movie movie = new Movie();
        movie.setDirector(person);
        movie.addToRoles(new Role());
        movie.addToRoles(new Role());
        service.save(movie);

        final Set<Object> savedObjects = service.allSavedObjects();
        Assert.assertEquals(4, savedObjects.size());
    }
View Full Code Here

Examples of org.apache.jetspeed.om.security.Role

     */

    public void testGetRoles() throws Exception
    {
        RoleManagement service = getService();
        Role role = null;
        HashMap map = new HashMap();

        try
        {
            Iterator roles = service.getRoles();
            while (roles.hasNext())
            {
                role = (Role)roles.next();
                map.put(role.getName(), role);
            }
            assertTrue(map.get("user") != null);
            assertTrue(map.get("admin") != null);
        }
        catch (Exception e)
View Full Code Here

Examples of org.apache.jetspeed.security.Role

        if (null == rolePrincipal)
        {
            throw new SecurityException(SecurityException.ROLE_DOES_NOT_EXIST.create(roleFullPathName));
        }
        Preferences preferences = Preferences.userRoot().node(fullPath);
        Role role = new RoleImpl(rolePrincipal, preferences);
        return role;
    }
View Full Code Here

Examples of org.apache.lenya.ac.Role

        obtainPolicies();
        Set roles = new HashSet();

        // no policies defined: return "visit" or "visitor" role
        if (isEmpty()) {
            Role visitorRole = getVisitorRole(getAccreditableManager());
            if (visitorRole != null) {
                roles.add(visitorRole);
            }
        } else {
            for (int i = 0; i < policies.length; i++) {
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.