Examples of assignRole()


Examples of com.sun.enterprise.deployment.interfaces.SecurityRoleMapper.assignRole()

                } else {
                    rm = getRoleMapper();
                }
                if (rm != null) {
                    if (roleMap.isExternallyDefined()) {
                        rm.assignRole(new Group(role.getName()), role, descriptor);
                    } else {
                        List<String> principals = roleMap.getPrincipalNames();
                        for (int i = 0; i < principals.size(); i++) {
                            rm.assignRole(new PrincipalImpl(principals.get(i)),
                                    role, descriptor);
View Full Code Here

Examples of com.sun.enterprise.deployment.interfaces.SecurityRoleMapper.assignRole()

                    if (roleMap.isExternallyDefined()) {
                        rm.assignRole(new Group(role.getName()), role, descriptor);
                    } else {
                        List<String> principals = roleMap.getPrincipalNames();
                        for (int i = 0; i < principals.size(); i++) {
                            rm.assignRole(new PrincipalImpl(principals.get(i)),
                                    role, descriptor);
                        }
                    }
                }
View Full Code Here

Examples of org.apache.archiva.redback.rest.api.services.RoleManagementService.assignRole()

        {
            roleManagementService.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal" );
        }

        getUserService( authorizationHeader ).createGuestUser();
        roleManagementService.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, "guest" );

        roleManagementService.assignTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal",
                                                   "guest" );

        getUserService( authorizationHeader ).removeFromCache( "guest" );
View Full Code Here

Examples of org.apache.archiva.redback.rest.api.services.RoleManagementService.assignRole()

        {
            roleManagementService.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, id );
        }

        getUserService( authorizationHeader ).createGuestUser();
        roleManagementService.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, "guest" );

        roleManagementService.assignTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, id,
                                                   "guest" );

        getUserService( authorizationHeader ).removeFromCache( "guest" );
View Full Code Here

Examples of org.apache.archiva.redback.rest.api.services.RoleManagementService.assignRole()

        {
            roleManagementService.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal" );
        }

        getUserService( authorizationHeader ).createGuestUser();
        roleManagementService.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, "guest" );

        roleManagementService.assignTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal",
                                                   "guest" );

        getUserService( authorizationHeader ).removeFromCache( "guest" );
View Full Code Here

Examples of org.apache.archiva.redback.rest.api.services.RoleManagementService.assignRole()

        {
            roleManagementService.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, id );
        }

        getUserService( authorizationHeader ).createGuestUser();
        roleManagementService.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, "guest" );

        roleManagementService.assignTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, id,
                                                   "guest" );

        getUserService( authorizationHeader ).removeFromCache( "guest" );
View Full Code Here

Examples of org.apache.archiva.redback.rest.api.services.RoleManagementService.assignRole()

        {
            roleManagementService.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal" );
        }

        getUserService( authorizationHeader ).createGuestUser();
        roleManagementService.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, "guest" );

        roleManagementService.assignTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal",
                                                   "guest" );

        getUserService( authorizationHeader ).removeFromCache( "guest" );
View Full Code Here

Examples of org.codehaus.redback.rest.api.services.RoleManagementService.assignRole()

        {
            roleManagementService.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal" );
        }

        getUserService( authorizationHeader ).createGuestUser();
        roleManagementService.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, "guest" );

        roleManagementService.assignTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal",
                                                   "guest" );

        getUserService( authorizationHeader ).removeFromCache( "guest" );
View Full Code Here

Examples of org.codehaus.redback.rest.api.services.RoleManagementService.assignRole()

        {
            roleManagementService.createTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal" );
        }

        getUserService( authorizationHeader ).createGuestUser();
        roleManagementService.assignRole( ArchivaRoleConstants.TEMPLATE_GUEST, "guest" );

        roleManagementService.assignTemplatedRole( ArchivaRoleConstants.TEMPLATE_REPOSITORY_OBSERVER, "internal",
                                                   "guest" );

        getUserService( authorizationHeader ).removeFromCache( "guest" );
View Full Code Here

Examples of org.glassfish.deployment.common.SecurityRoleMapper.assignRole()

                Role role = new Role(srm.getRoleName());
                SecurityRoleMapper rm = app.getRoleMapper();
                if (rm != null) {
                    List<PrincipalNameDescriptor> principals = srm.getPrincipalNames();
                    for (int i = 0; i < principals.size(); i++) {
                        rm.assignRole(principals.get(i).getPrincipal(),
                            role, descriptor);
                    }
                    List<String> groups = srm.getGroupNames();
                    for (int i = 0; i < groups.size(); i++) {
                        rm.assignRole(new Group(groups.get(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.