Examples of retrieveUserPermissions()


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

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

        PermissionManager pm = new PermissionManager( repository );
        return pm.retrieveUserPermissions( userName );
    }

    @Restrict("#{identity.loggedIn}")
    public void updateUserPermissions(String userName,
                                      Map<String, List<String>> perms) {
View Full Code Here

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

  public List<RoleBasedPermission> getRoleBasedPermissionsByUserName(
      String userName) {
    PermissionManager permissionManager = new PermissionManager(repository);
    List<RoleBasedPermission> permissions = new ArrayList<RoleBasedPermission>();
    Map<String, List<String>> perms = permissionManager
        .retrieveUserPermissions(userName);
    for (String roleType : perms.keySet()) {
      if(RoleTypes.ADMIN.equals(roleType)) {
        permissions.add(new RoleBasedPermission(userName, RoleTypes.ADMIN,
            null, null));
View Full Code Here

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

  }


  public void addRoleBasedPermissionForTesting(String userName, RoleBasedPermission rbp) {
    PermissionManager permissionManager = new PermissionManager(repository);
    Map<String, List<String>> perms = permissionManager
        .retrieveUserPermissions(userName);
    Object permissionsPerRole = perms.get(rbp.getRole());
    if (permissionsPerRole != null) {
      if (rbp.getPackageName() != null) {
        ((List<String>) permissionsPerRole).add("package="
View Full Code Here

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

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

        PermissionManager pm = new PermissionManager( repository );
        return pm.retrieveUserPermissions( userName );
    }

    @Restrict("#{identity.loggedIn}")
    public void updateUserPermissions(String userName,
                                      Map<String, List<String>> perms) {
View Full Code Here

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

    @Restrict("#{identity.loggedIn}")
    public Map<String, List<String>> retrieveUserPermissions(String userName) {
        serviceSecurity.checkSecurityIsAdmin();

        PermissionManager pm = new PermissionManager( getRulesRepository() );
        return pm.retrieveUserPermissions( userName );
    }

    @Restrict("#{identity.loggedIn}")
    public void updateUserPermissions(String userName,
                                      Map<String, List<String>> perms) {
View Full Code Here

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

    @Restrict("#{identity.loggedIn}")
    public Map<String, List<String>> retrieveUserPermissions(String userName) {
        serviceSecurity.checkSecurityIsAdmin();

        PermissionManager pm = new PermissionManager( getRulesRepository() );
        return pm.retrieveUserPermissions( userName );
    }

    @Restrict("#{identity.loggedIn}")
    public void updateUserPermissions(String userName,
                                      Map<String, List<String>> perms) {
View Full Code Here

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

            put("package.developer", new ArrayList<String>() {{add("1"); add("2");}});
            put("analyst", new ArrayList<String>() {{add("HR");}});
            put("admin", new ArrayList<String>());
        }};
        pm.updateUserPermissions("wankle", perms);
        Map<String, List<String>> perms_ = pm.retrieveUserPermissions("wankle");


        UserInfo info = new UserInfo(repo);
        info.setProperty("inbox", "something", new UserInfo.Val("boo"));
        info.save();
View Full Code Here

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

        assertEquals("boo2", info.getProperty("inbox", "something").value);

        info.setProperty("inbox", "another", new UserInfo.Val("boo"));
        assertEquals("boo", info.getProperty("inbox", "another").value);

        assertEquals(perms_.size(), pm.retrieveUserPermissions("wankle").size());


        pm.updateUserPermissions("wankle", perms_);
        info = new UserInfo(repo);
        assertEquals("boo", info.getProperty("inbox", "another").value);
View Full Code Here

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

            put("package.developer", new ArrayList<String>() {{add("1"); add("2");}});
            put("analyst", new ArrayList<String>() {{add("HR");}});
            put("admin", new ArrayList<String>());
        }};
        pm.updateUserPermissions("wankle", perms);
        Map<String, List<String>> perms_ = pm.retrieveUserPermissions("wankle");


        UserInfo info = new UserInfo(repo);
        info.setProperty("inbox", "something", new UserInfo.Val("boo"));
        info.save();
View Full Code Here

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

        assertEquals("boo2", info.getProperty("inbox", "something").value);

        info.setProperty("inbox", "another", new UserInfo.Val("boo"));
        assertEquals("boo", info.getProperty("inbox", "another").value);

        assertEquals(perms_.size(), pm.retrieveUserPermissions("wankle").size());


        pm.updateUserPermissions("wankle", perms_);
        info = new UserInfo(repo);
        assertEquals("boo", info.getProperty("inbox", "another").value);
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.