Examples of Role


Examples of org.codehaus.plexus.redback.rbac.Role

            {
                Collection effectiveRoles = rbac.getEffectivelyAssignedRoles( user.getUsername() );

                for ( Iterator j = effectiveRoles.iterator(); j.hasNext(); )
                {
                    Role role = (Role) j.next();

                    if ( role.getName().indexOf( projectGroup.getName() ) > -1 )
                    {
                        pgUser.setRoles( effectiveRoles );
                        projectGroupUsers.add( pgUser );
                        break;
                    }
View Full Code Here

Examples of org.dedeler.template.model.Role

  public boolean hasPermission(Authentication authentication, Object targetDomainObject, Object permission) {

    Collection<GrantedAuthority> authorities = (Collection<GrantedAuthority>) authentication.getAuthorities();
    for (GrantedAuthority authority : authorities) {
      if(authority instanceof Role){
        Role role = (Role) authority;
        List<Privilege> privileges = role.getPrivileges();
        for (Privilege privilege : privileges) {
          if (permission.equals(privilege.getName())) {
            return true;
          }
        }       
View Full Code Here

Examples of org.dspace.xmlworkflow.Role

    }
        return roleGroup;
    }
   
    private static Group getXMLWorkflowRole(Context context, int collectionID, String roleName, Collection collection, Group roleGroup) throws IOException, WorkflowConfigurationException, SQLException, AuthorizeException {
        Role role = WorkflowUtils.getCollectionAndRepositoryRoles(collection).get(roleName);
        if(role.getScope() == Role.Scope.COLLECTION || role.getScope() == Role.Scope.REPOSITORY){
            roleGroup = WorkflowUtils.getRoleGroup(context, collectionID, role);
            if(roleGroup == null){
                AuthorizeManager.authorizeAction(context, collection, Constants.WRITE);
                roleGroup = Group.create(context);
                if(role.getScope() == Role.Scope.COLLECTION){
                    roleGroup.setName("COLLECTION_" + collection.getID() + "_WORKFLOW_ROLE_" + roleName);
                }else{
                    roleGroup.setName(role.getName());
                }
                roleGroup.update();
                AuthorizeManager.addPolicy(context, collection, Constants.ADD, roleGroup);
                if(role.getScope() == Role.Scope.COLLECTION){
                    WorkflowUtils.createCollectionWorkflowRole(context, collectionID, roleName, roleGroup);
                }
           }
        }
        return roleGroup;
View Full Code Here

Examples of org.eclipse.bpel.model.partnerlinktype.Role

            // portType is now optional. If the user hasn't set it, then
            // infer it from the partnerLink attribute and the
            // direction of this activity.
            PartnerLink link = getPartnerLink();
            if (link != null) {
                Role role = null;
                if (this instanceof Invoke) {
                    role = link.getPartnerRole();
                } else {
                    role = link.getMyRole();
                }
                if (role != null) {
                  portType = (PortType)role.getPortType();
                }
            }
            return portType;
        }
    }
View Full Code Here

Examples of org.elevenbits.westvleteren.model.Role

        }
    }

    public void testCreateAndGetAndRemoveRole() throws Exception {
      log.warn("Creating a role");
      Role role = new Role("role", "description");
      dao.saveRole(role);
      Integer id = role.getId();
      role = dao.getRole(id);
      assertEquals(role.getName(), "role");
      assertEquals(role.getDescription(), "description");
      log.warn("Role created: " + role);
      dao.removeRole(role);
      log.warn("Role removed");
      try {
        role = dao.getRole(id);
View Full Code Here

Examples of org.evolizer.model.resources.entities.humans.Role

    assertTrue(pp.getNickNames().contains("'se Michiator"));
  }
 
  @Test
  public void testRoles() {
    Role role = new Role("Developer");
   
    assertEquals("Developer", role.getLabel());
   
    Role pRole = saveAndReloadUniqueFromDB(role, "from Role", Role.class);
    assertEquals("Developer", pRole.getLabel());
  }
View Full Code Here

Examples of org.ggp.base.util.statemachine.Role

     * @param newStateMachine the new state machine
     */
    protected final void switchStateMachine(StateMachine newStateMachine) {
        try {
            MachineState newCurrentState = newStateMachine.getInitialState();
            Role newRole = newStateMachine.getRoleFromConstant(getRoleName());

            // Attempt to run through the game history in the new machine
            List<List<GdlTerm>> theMoveHistory = getMatch().getMoveHistory();
            for(List<GdlTerm> nextMove : theMoveHistory) {
                List<Move> theJointMove = new ArrayList<Move>();
View Full Code Here

Examples of org.glassfish.security.common.Role

      Set roleReferences = descriptor.getRoleReferences();
      Iterator roleRefsIterator = roleReferences.iterator();
      EjbBundleDescriptorImpl bundleDescriptor = descriptor.getEjbBundleDescriptor();
      Set roles = bundleDescriptor.getRoles();
      Iterator roleIterator = roles.iterator();
      Role role = null;
      RoleReference roleReference = null;
      boolean found = false;
      boolean oneFailed = false;
     
      if (roleRefsIterator.hasNext()) {
    while (roleRefsIterator.hasNext()) {
        found = false;
        roleReference = (RoleReference)roleRefsIterator.next();

        while (roleIterator.hasNext()) {
      role = (Role)roleIterator.next();
      if (role.getName().equals(roleReference.getValue())) {
          found = true;
          //reset this so next time it drop back into here
          roleIterator = roles.iterator();
          break;
      }
View Full Code Here

Examples of org.h2.engine.Role

            break;
        }
        case RIGHTS: {
            if (admin) {
                for (Right r : database.getAllRights()) {
                    Role role = r.getGrantedRole();
                    DbObject grantee = r.getGrantee();
                    String rightType = grantee.getType() == DbObject.USER ? "USER" : "ROLE";
                    if (role == null) {
                        Table granted = r.getGrantedTable();
                        String tableName = identifier(granted.getName());
                        if (!checkIndex(session, tableName, indexFrom, indexTo)) {
                            continue;
                        }
                        add(rows,
                                // GRANTEE
                                identifier(grantee.getName()),
                                // GRANTEETYPE
                                rightType,
                                // GRANTEDROLE
                                "",
                                // RIGHTS
                                r.getRights(),
                                // TABLE_SCHEMA
                                identifier(granted.getSchema().getName()),
                                // TABLE_NAME
                                identifier(granted.getName()),
                                // ID
                                "" + r.getId()
                        );
                    } else {
                        add(rows,
                                // GRANTEE
                                identifier(grantee.getName()),
                                // GRANTEETYPE
                                rightType,
                                // GRANTEDROLE
                                identifier(role.getName()),
                                // RIGHTS
                                "",
                                // TABLE_SCHEMA
                                "",
                                // TABLE_NAME
View Full Code Here

Examples of org.hornetq.core.security.Role

      allRoles.addAll(manage);

      Set<Role> roles = new HashSet<Role>();
      for (String role : allRoles)
      {
         roles.add(new Role(role,
             send.contains(role),
             consume.contains(role),
             createDurableQueue.contains(role),
             deleteDurableQueue.contains(role),
             createNonDurableQueue.contains(role),
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.