Examples of grantRole()


Examples of org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizer.grantRole()

    }
    List<HivePrincipal> hivePrincipals = getHivePrincipals(grantOrRevokeRoleDDL.getPrincipalDesc());
    List<String> roles = grantOrRevokeRoleDDL.getRoles();

    if(grantOrRevokeRoleDDL.getGrant()){
      authorizer.grantRole(hivePrincipals, roles,
          grantOrRevokeRoleDDL.isGrantOption(), grantorPrinc);
    }
    else{
      authorizer.revokeRole(hivePrincipals, roles,
          grantOrRevokeRoleDDL.isGrantOption(), grantorPrinc);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizer.grantRole()

    }
    List<HivePrincipal> hivePrincipals = getHivePrincipals(grantOrRevokeRoleDDL.getPrincipalDesc());
    List<String> roles = grantOrRevokeRoleDDL.getRoles();

    if(grantOrRevokeRoleDDL.getGrant()){
      authorizer.grantRole(hivePrincipals, roles,
          grantOrRevokeRoleDDL.isGrantOption(), grantorPrinc);
    }
    else{
      authorizer.revokeRole(hivePrincipals, roles,
          grantOrRevokeRoleDDL.isGrantOption(), grantorPrinc);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizer.grantRole()

        AuthorizationUtils.getHivePrincipals(grantOrRevokeRoleDDL.getPrincipalDesc());
    List<String> roles = grantOrRevokeRoleDDL.getRoles();

    boolean grantOption = grantOrRevokeRoleDDL.isGrantOption();
    if (grantOrRevokeRoleDDL.getGrant()) {
      authorizer.grantRole(principals, roles, grantOption, grantorPrinc);
    } else {
      authorizer.revokeRole(principals, roles, grantOption, grantorPrinc);
    }
    return 0;
  }
View Full Code Here

Examples of org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizer.grantRole()

    }
    List<HivePrincipal> hivePrincipals = getHivePrincipals(grantOrRevokeRoleDDL.getPrincipalDesc());
    List<String> roles = grantOrRevokeRoleDDL.getRoles();

    if(grantOrRevokeRoleDDL.getGrant()){
      authorizer.grantRole(hivePrincipals, roles,
          grantOrRevokeRoleDDL.isGrantOption(), grantorPrinc);
    }
    else{
      authorizer.revokeRole(hivePrincipals, roles,
          grantOrRevokeRoleDDL.isGrantOption(), grantorPrinc);
View Full Code Here

Examples of org.apache.hadoop.hive.ql.security.authorization.plugin.HiveAuthorizer.grantRole()

    }
    List<HivePrincipal> hivePrincipals = getHivePrincipals(grantOrRevokeRoleDDL.getPrincipalDesc());
    List<String> roles = grantOrRevokeRoleDDL.getRoles();

    if(grantOrRevokeRoleDDL.getGrant()){
      authorizer.grantRole(hivePrincipals, roles,
          grantOrRevokeRoleDDL.isGrantOption(), grantorPrinc);
    }
    else{
      authorizer.revokeRole(hivePrincipals, roles,
          grantOrRevokeRoleDDL.isGrantOption(), grantorPrinc);
View Full Code Here

Examples of org.apache.roller.weblogger.business.UserManager.grantRole()

        UserManager umgr = WebloggerFactory.getWeblogger().getUserManager();
        assertTrue(umgr.checkPermission(perm, testUser));
       
        // we need a second user for this test
        User adminUser = TestUtils.setupUser("adminUser");
        umgr.grantRole("admin", adminUser);
        TestUtils.endSession(true);

        // because adminUser is a global admin, they should have POST perm
        WeblogPermission perm2 =
            new WeblogPermission(testWeblog, testUser, WeblogPermission.POST);
View Full Code Here

Examples of org.apache.roller.weblogger.business.UserManager.grantRole()

            newUser.setUserName(getBean().getUserName());
            newUser.resetPassword(getBean().getPassword());
           
            // are we granting the user admin rights?
            if(((CreateUserBean)getBean()).isAdministrator()) {
                mgr.grantRole("admin", newUser);
            }
           
            // save new user
            mgr.addUser(newUser);
            WebloggerFactory.getWeblogger().flush();
View Full Code Here

Examples of org.apache.roller.weblogger.business.UserManager.grantRole()

                   
                } else if(!hasAdmin && getBean().isAdministrator()) {
                   
                    if (!isUserEditingSelf()) {
                        // grant role
                        mgr.grantRole("admin", getUser());
                    } else {
                        addError("userAdmin.cantChangeOwnRole");
                    }
                   
                }
View Full Code Here

Examples of org.apache.roller.weblogger.pojos.User.grantRole()

            newUser.setUserName(getBean().getUserName());
            newUser.resetPassword(getBean().getPassword());
           
            // are we granting the user admin rights?
            if(((CreateUserBean)getBean()).isAdministrator()) {
                newUser.grantRole("admin");
            }
           
            // save new user
            mgr.addUser(newUser);
            WebloggerFactory.getWeblogger().flush();
View Full Code Here

Examples of org.keycloak.models.UserModel.grantRole()

        em.flush();
        UserModel userModel = new UserAdapter(realm, em, entity);

        if (addDefaultRoles) {
            for (String r : realm.getDefaultRoles()) {
                userModel.grantRole(realm.getRole(r));
            }

            for (ApplicationModel application : realm.getApplications()) {
                for (String r : application.getDefaultRoles()) {
                    userModel.grantRole(application.getRole(r));
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.