Examples of listUsers()


Examples of org.drools.repository.security.PermissionManager.listUsers()

            Identity.instance().checkPermission( new AdminType(),
                                                 RoleTypes.ADMIN );
        }

        PermissionManager pm = new PermissionManager( repository );
        return pm.listUsers();
    }

    @Restrict("#{identity.loggedIn}")
    public Map<String, List<String>> retrieveUserPermissions(String userName) {
        if ( Contexts.isSessionContextActive() ) {
View Full Code Here

Examples of org.jboss.test.hibernate.ejb.interfaces.ProfileService.listUsers()

            // make *sure* it gets loaded into cache.  This is to check
            // that JBossCache as 2nd-level cache is properly releasing
            // resources on SF shutdown; I have manually verified this is
            // the case w/o JBossCache as the 2nd-level cache (i.e. this
            // test case passes w/o JBossCache in the mix).
            List users = service.listUsers();
            assertNotNull( users );
            assertEquals( "Incorrect result size", 1, users.size() );
         }
         finally
         {
View Full Code Here

Examples of org.jboss.test.hibernate.ejb.interfaces.ProfileService.listUsers()

         Long savedUserId = service.storeUser( user ).getId();
         try
         {
            getLog().info("User created with id = " + savedUserId );

            List users = service.listUsers();
            assertNotNull( users );
            assertEquals( "Incorrect result size", 1, users.size() );
         }
         finally
         {
View Full Code Here

Examples of org.jboss.test.hibernate.ejb.interfaces.ProfileService.listUsers()

         user.setHandle("myHandle");

         Long savedUserId = service.storeUser( user ).getId();
         getLog().info("User created with id = " + savedUserId );

         List users = service.listUsers();
         assertNotNull( users );
         assertEquals( "Incorrect result size", 1, users.size() );

         Long userId = ( ( User ) users.get( 0 ) ).getId();
         assertEquals( "Saved used not returned", savedUserId, userId );
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserManager.listUsers()

  @Test
  public void testGetUsers()
      throws Exception
  {
    UserManager userLocator = this.getUserManager();
    Set<User> users = userLocator.listUsers();

    User cstamas = this.getById(users, "cstamas");
    Assert.assertEquals("cstamas", cstamas.getUserId());
    Assert.assertEquals("cstamas@sonatype.com", cstamas.getEmailAddress());
    Assert.assertEquals("Tamas Cservenak", cstamas.getName());
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserManager.listUsers()

  public void testListUsers()
      throws Exception
  {
    UserManager userLocator = this.getUserManager();

    Set<User> users = userLocator.listUsers();
    Map<String, User> userMap = this.toUserMap(users);

    Assert.assertTrue(userMap.containsKey("test-user"));
    Assert.assertTrue(userMap.containsKey("anonymous"));
    Assert.assertTrue(userMap.containsKey("admin"));
View Full Code Here

Examples of org.sonatype.security.usermanagement.UserManager.listUsers()

  public void testUserList()
      throws Exception
  {
    UserManager userLocator = this.lookup(UserManager.class, "Simple");

    Set<User> users = userLocator.listUsers();
    // your test could be a bit more robust
    Assert.assertEquals(3, users.size());
  }

}
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.listUsers()

            throw new RegistryException("Error in retrieving AuthorizationManager.");
        }

        String[] users;
        try {
            users = userStoreManager2.listUsers("*", 10);
        } catch (UserStoreException e) {
            throw new RegistryException("Error in retrieving UserStoreManager.");
        }
        // check the existence of the user
        assertFalse("UserStore for tenant1 should not have user1t0",
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.listUsers()

    }

    public FlaggedName[] getUsersOfRole(String roleName, String filter) throws UserAdminException {
        try {
            UserStoreManager usMan = realm.getUserStoreManager();
            String[] userNames = usMan.listUsers(filter, -1);
            String[] usersOfRole = usMan.getUserListOfRole(roleName);
            Arrays.sort(usersOfRole);
            FlaggedName[] flaggedNames = new FlaggedName[userNames.length];
            for (int i = 0; i < userNames.length; i++) {
                FlaggedName fName = new FlaggedName();
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.listUsers()

        // update
        admin.updateCredential("dimuthu", "password", "topsecret");
        assertFalse(admin.authenticate("dimuthu", "credential"));
        assertTrue(admin.authenticate("dimuthu", "password"));

        String[] names = admin.listUsers("*", 100);
        assertEquals(3, names.length);

        String[] roleNames = admin.getRoleNames();
        assertEquals(4, roleNames.length);

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.