Examples of SimpleRole


Examples of org.pentaho.platform.engine.security.SimpleRole

      }

      if ( aclUser != null ) {
        pentahoAclEntries.put( new SimpleUser( aclUser ), new SimplePermissionMask( aclValue ) );
      } else {
        pentahoAclEntries.put( new SimpleRole( aclRole ), new SimplePermissionMask( aclValue ) );
      }
    }

    return pentahoAclEntries;
  }
View Full Code Here

Examples of org.pentaho.platform.engine.security.SimpleRole

      @Override
      public Void call() throws Exception {
        RepositoryFile testFile = new RepositoryFile( "Test Folder", null, null ); //$NON-NLS-1$
        Map<IPermissionRecipient, IPermissionMask> perms = new LinkedHashMap<IPermissionRecipient, IPermissionMask>();
        perms.put( new SimpleUser( "suzy" ), new SimplePermissionMask( IPentahoAclEntry.PERM_EXECUTE ) );
        perms.put( new SimpleRole( "ROLE_POWER_USER" ), new SimplePermissionMask( IPentahoAclEntry.PERM_SUBSCRIBE ) );
        SpringSecurityPermissionMgr.instance().setPermissions( perms, testFile );
        PentahoBasicAclVoter voter = new PentahoBasicAclVoter();
        assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile, IPentahoAclEntry.PERM_EXECUTE ) );
        assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile, IPentahoAclEntry.PERM_SUBSCRIBE ) );
        assertTrue( voter.hasAccess( PentahoSessionHolder.getSession(), testFile,
View Full Code Here

Examples of org.pentaho.platform.engine.security.SimpleRole

      @Override
      public Void call() throws Exception {
        RepositoryFile testFile = new RepositoryFile( "Test Folder", null, null ); //$NON-NLS-1$
        Map<IPermissionRecipient, IPermissionMask> perms = new LinkedHashMap<IPermissionRecipient, IPermissionMask>();
        perms.put( new SimpleUser( "suzy" ), new SimplePermissionMask( IPentahoAclEntry.PERM_NOTHING ) );
        perms.put( new SimpleRole( "ROLE_POWER_USER" ), new SimplePermissionMask(
          IPentahoAclEntry.PERM_FULL_CONTROL ) );
        SpringSecurityPermissionMgr.instance().getPermissions( testFile );

        // Now, the stage is set. We should be able to double-check that suzy
        // has no access to the testFile.
View Full Code Here

Examples of org.pentaho.platform.engine.security.SimpleRole

      new LinkedHashMap<IPermissionRecipient, IPermissionMask>();

  public void setup() {
    super.setUp();
    defaultAcls.put(
        new SimpleRole( "ROLE_ADMINISTRATOR" ), new SimplePermissionMask( IPentahoAclEntry.PERM_FULL_CONTROL ) ); //$NON-NLS-1$
    defaultAcls
        .put( new SimpleRole( "ROLE_POWER_USER" ), new SimplePermissionMask( IPentahoAclEntry.PERM_FULL_CONTROL ) ); //$NON-NLS-1$
    defaultAcls.put( new SimpleRole( "ROLE_AUTHENTICATED" ), new SimplePermissionMask( IPentahoAclEntry.PERM_EXECUTE ) ); //$NON-NLS-1$
  }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleRole

    public boolean addRole(String roleType, String group, String groupType) {
        if (roleType == null || "".equals(roleType) || group == null || "".equals(group)
                || groupType == null || "".equals(groupType)) return false;

        if (isLoggedIn()) {
            return activeRoles.add(new SimpleRole(new SimpleRoleType(roleType),
                    user, new SimpleGroup(group, groupType)));
        } else {
            List<String> roleTypes = null;

            Map<String, List<String>> groupTypes = preAuthenticationRoles.get(group);
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleRole

      roleGroup = null;
   }
  
   public String roleSave()
   {     
      roles.add(new SimpleRole(roleType, null, roleGroup));
      return "success";
   }
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleRole

      if (roleType == null || "".equals(roleType) || group == null || "".equals(group)
            || groupType == null || "".equals(groupType)) return false;
     
      if (isLoggedIn())
      {
         return activeRoles.add(new SimpleRole(new SimpleRoleType(roleType),
               user, new SimpleGroup(group, groupType)));
      }
      else
      {
         List<String> roleTypes = null;
View Full Code Here

Examples of org.picketlink.idm.impl.api.model.SimpleRole

        roleType = null;
        roleGroup = null;
    }

    public String roleSave() {
        roles.add(new SimpleRole(roleType, null, roleGroup));
        return "success";
    }
View Full Code Here

Examples of org.picketlink.idm.model.SimpleRole

    public GrantConfiguration roles(String[] roles) {
        list = new ArrayList<Role>();
        for (String role : roles) {
            Role newRole = identityManager.getRole(role);
            if (newRole == null) {
                newRole = new SimpleRole(role);
                identityManager.add(newRole);
            }
            list.add(newRole);
        }
        return this;
View Full Code Here

Examples of org.picketlink.idm.model.SimpleRole

         * See http://lists.jboss.org/pipermail/security-dev/2013-January/000650.html for more information
         */
        this.identityManager.add(user);
        this.identityManager.updateCredential(user, new Password("123"));

        Role roleDeveloper = new SimpleRole("simple");
        Role roleAdmin = new SimpleRole("admin");

        this.identityManager.add(roleDeveloper);
        this.identityManager.add(roleAdmin);

        identityManager.grantRole(user, roleDeveloper);
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.