Examples of UserRoles


Examples of br.facet.tcc.enums.UserRoles

     */
    @Test
    public void testAtualizar() throws DaoException {
        Permissao permissao = this.getPermissaoDao().listar(Permissao.class)
                .get(0);
        UserRoles expected = permissao.getRole();
        permissao.setRole(UserRoles.ROLE_USR);
        this.getPermissaoDao().atualizar(permissao);

        UserRoles actual = this.getPermissaoDao().listar(Permissao.class)
                .get(0).getRole();
        Assert.assertNotSame("Tipos de permissao s�o diferentes", expected,
                actual);
    }
View Full Code Here

Examples of br.facet.tcc.pojo.UserRoles

     */
    @Override
    public Object getAsObject(FacesContext context, UIComponent component,
            String value) {
        System.out.println(" ============ getAsObject ===============");
        UserRoles role = new UserRoles();
        for (br.facet.tcc.enums.UserRoles userRoles : br.facet.tcc.enums.UserRoles
                .values()) {
            if (userRoles.getDescricao().equals(value)) {
                role.setId(userRoles.getId());
                role.setUserRole(userRoles);

            }
        }
        return role;
    }
View Full Code Here

Examples of br.facet.tcc.pojo.UserRoles

     * @since since optional
     */
    @Override
    public Object getAsObject(FacesContext context, UIComponent component,
            String value) {
        UserRoles role = new UserRoles();
        for (br.facet.tcc.enums.UserRoles userRoles : br.facet.tcc.enums.UserRoles
                .values()) {
            if (userRoles.getDescricao().equals(value)) {
                role.setId(userRoles.getId());
                role.setUserRole(userRoles);

            }
        }
        return role;
    }
View Full Code Here

Examples of com.aerospike.client.UserRoles

          return -1;
        }
        return resultCode;
      }

      UserRoles userRoles = new UserRoles();
      int fieldCount = dataBuffer[dataOffset + 3];
      dataOffset += HEADER_REMAINING;

      for (int i = 0; i < fieldCount; i++) {
        int len = Buffer.bytesToInt(dataBuffer, dataOffset);
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

        permissions.put(TaskPermissions.ACTION_DELETE, deletePermissions);
        return new TaskPermissions(permissions);
    }

    public static SimpleAuthProvider getMeASimpleAuthProvider() {
        UserRoles user1 = new UserRoles("test/user1", new String[] { "test/role1", "test/role2" });
        UserRoles user2 = new UserRoles("test/user2", new String[] { "test/role2", "test/role3" });
        UserRoles user3 = new UserRoles("test/user3", new String[] { "test/role4", "test/role5" });
        UserRoles systemUser = new UserRoles("test/system-user", new String[] { "test/role1", "test/role2","test/role3", "examples/employee", "*/*"});

        SimpleAuthProvider authProvider = new SimpleAuthProvider();
        authProvider.addUserToken("token1", user1);
        authProvider.addUserToken("token2", user2);
        authProvider.addUserToken("token3", user3);
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

      createPerms.add("just\\me");
      permissions.put("create", createPerms);
     
      TaskPermissions tp = new TaskPermissions(permissions);
     
      UserRoles ur = new UserRoles("Matthieu", new AuthIdentifierSet(new String[]{"intalio\\admin", "intalio\\tester"}));
      UserRoles ur2 = new UserRoles("Niko", new AuthIdentifierSet(new String[]{"intalio\\guru"}));
      UserRoles ur3 = new UserRoles("just\\me", new AuthIdentifierSet(new String[]{"intalio\\guru"}));
     
     
      Assert.assertFalse(tp.isAuthorized("create", new PIPATask(), ur));
      Assert.assertTrue(tp.isAuthorized("delete", new PIPATask(), ur));
      Assert.assertFalse(tp.isAuthorized("delete", new PIPATask(), ur2));
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

    public void testN3AuthProvider() throws Exception {
        N3AuthProvider n3 = new N3AuthProvider();
        n3.setWsEndpoint("http://localhost:8080/axis2/services/TokenService");
       
        IAuthProvider provider = n3;
        UserRoles user = provider.authenticate(SYSTEM_TEST_TOKEN);
        Assert.assertEquals("exolab\\castor", user.getUserID());
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

            {
                one(tc).getTokenProperties(SYSTEM_TEST_TOKEN); will(returnValue(properties));
            }
        });
        ap.setWsEndpoint("http://localhost:8080/axis2/services/TokenService");
        UserRoles user = ap.authenticate(SYSTEM_TEST_TOKEN);
        Assert.assertEquals("exolab\\castor", user.getUserID());
    }
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

    public void testAssignClaimAndAvailable() throws Exception {
      PATask task = this.createPATask();
      task.setState(TaskState.READY);
      task.getRoleOwners().add("group");
      task.getUserOwners().add("gregor");
      UserRoles gregor = new UserRoles("gregor", new String[]{"group"});
      UserRoles niko = new UserRoles("niko", new String[]{"group"});
      Assert.assertTrue(task.isAvailableTo(gregor));
      Assert.assertTrue(task.isAvailableTo(niko));
      task.setState(TaskState.CLAIMED);
      Assert.assertTrue(task.isAvailableTo(gregor));
      Assert.assertFalse(task.isAvailableTo(niko));
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

    public static void main(String[] args) {
        junit.textui.TestRunner.run(TaskMarshallerTest.class);
    }

    private void testTaskMarshalling(Task task) throws Exception {
        _logger.debug(TestUtils.toPrettyXML(new TaskMarshaller().marshalFullTask(task, new UserRoles("testUser", new String[]{}))));
    }
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.