Examples of removeRole()


Examples of org.atomojo.auth.service.db.Group.removeRole()

                     }
                    
                  } else if (facetName!=null) {
                     try {
                        Role role = db.getRole(facetName);
                        if (role!=null && group.removeRole(role)) {
                           getResponse().setStatus(Status.SUCCESS_NO_CONTENT);
                        } else {
                           getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
                        }
                        return null;
View Full Code Here

Examples of org.atomojo.auth.service.db.User.removeRole()

                     getResponse().setStatus(Status.CLIENT_ERROR_METHOD_NOT_ALLOWED);
                     return null;
                  } else {
                     Role role = fetchRole(user);
                     if (role!=null) {
                        if (user.removeRole(role)) {
                           getResponse().setStatus(Status.SUCCESS_NO_CONTENT);
                           return null;
                        } else {
                           getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
                           return null;
View Full Code Here

Examples of org.geoserver.security.GeoServerRoleStore.removeRole()

            @Override
            public GeoServerSecurityManager createSecurityManager( MockTestData testData) throws Exception {
                GeoServerSecurityManager secMgr = createNiceMock(GeoServerSecurityManager.class);

                GeoServerRoleStore roleStore = createRoleStore("test", secMgr, "role1", "parent1");
                expect(roleStore.removeRole(new GeoServerRole("unused"))).andReturn(true);

                DataAccessRule dataAccessRule = createNiceMock(DataAccessRule.class);
                expect(dataAccessRule.compareTo(dataAccessRule)).andReturn(0).anyTimes();
                expect(dataAccessRule.getKey()).andReturn("foo").anyTimes();
                expect(dataAccessRule.getRoles()).andReturn(new TreeSet<String>(Arrays.asList("role1"))).anyTimes();
View Full Code Here

Examples of org.hornetq.spi.core.security.HornetQSecurityManager.removeRole()

         securityManager.addRole("auser", "receiver");

         session.createConsumer(SecurityTest.queueA);

         // Removing the Role... the check should be cached, so the next createConsumer shouldn't fail
         securityManager.removeRole("auser", "receiver");

         session.createConsumer(SecurityTest.queueA);

         session.close();
View Full Code Here

Examples of org.huihoo.workflow.usermodel.WorkflowParticipant.removeRole()

      while (users.hasNext())
      {
        WorkflowParticipant user = (WorkflowParticipant) users.next();
        if (user.isInRole(this))
        {
          user.removeRole(this);
        }
      }
    }

}
View Full Code Here

Examples of org.jboss.seam.security.Identity.removeRole()

         assert(!identity.hasRole("admin"));
        
         // The foo role is added by MockLoginModule
         assert(identity.hasRole("foo"));
        
         identity.removeRole("foo");
         assert(!identity.hasRole("foo"));
        
         try
         {
            // This should throw an AuthorizationException
View Full Code Here

Examples of org.keycloak.models.ApplicationModel.removeRole()

        if (id == null) return false;
        ApplicationModel application = getApplicationById(id);
        if (application == null) return false;

        for (RoleModel role : application.getRoles()) {
            application.removeRole(role);
        }

        ApplicationEntity applicationEntity = null;
        Iterator<ApplicationEntity> it = realm.getApplications().iterator();
        while (it.hasNext()) {
View Full Code Here

Examples of org.libreplan.business.users.entities.User.removeRole()

        User user = getBoundUserFromDB(worker);
        if (removeBoundUser) {
            userDAO.remove(user);
        } else {
            if (user != null) {
                user.removeRole(UserRole.ROLE_BOUND_USER);
                userDAO.save(user);
            }
        }
    }
View Full Code Here

Examples of org.opentides.bean.user.UserGroup.removeRole()

    Set<UserRole> roles = testGroup.getRoles();
    assertNotNull(roles);
    assertTrue(roles.size() == 1);
    assertTrue(roles.iterator().next().getRole().equals(role1.getRole()));

    testGroup.removeRole(role1);
    userGroupDAO.saveEntityModel(testGroup);

    assertEquals(testGroup.getId(), group.getId());
    UserGroup testGroup2 = userGroupDAO.loadEntityModel(testGroup.getId());
    assertTrue(testGroup2.getRoles().size() == 0);
View Full Code Here

Examples of org.osgi.service.useradmin.UserAdmin.removeRole()

            readRoles = ua.getRoles(null);

            assertNotNull("No roles stored?!", readRoles);
            assertEquals(1, readRoles.length);

            ua.removeRole(roleName);

            readRoles = ua.getRoles(null);

            assertNull("Still roles stored?!", readRoles);
        }
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.