Tabnine Logo
Authorizer.createRole
Code IndexAdd Tabnine to your IDE (free)

How to use
createRole
method
in
co.cask.cdap.security.spi.authorization.Authorizer

Best Java code snippets using co.cask.cdap.security.spi.authorization.Authorizer.createRole (Showing top 3 results out of 315)

origin: cdapio/cdap

/********************************************************************************************************************
 * Role Management : For Role Based Access Control
 ********************************************************************************************************************/
@Path("/roles/{role-name}")
@PUT
public void createRole(HttpRequest httpRequest, HttpResponder httpResponder,
            @PathParam("role-name") String roleName) throws Exception {
 ensureSecurityEnabled();
 authorizer.createRole(new Role(roleName));
 httpResponder.sendStatus(HttpResponseStatus.OK);
 createLogEntry(httpRequest, HttpResponseStatus.OK);
}
origin: co.cask.cdap/cdap-app-fabric

/********************************************************************************************************************
 * Role Management : For Role Based Access Control
 ********************************************************************************************************************/
@Path("/roles/{role-name}")
@PUT
public void createRole(HttpRequest httpRequest, HttpResponder httpResponder,
            @PathParam("role-name") String roleName) throws Exception {
 ensureSecurityEnabled();
 authorizer.createRole(new Role(roleName));
 httpResponder.sendStatus(HttpResponseStatus.OK);
 createLogEntry(httpRequest, HttpResponseStatus.OK);
}
origin: cdapio/cdap

Role engineers = new Role("engineers");
authorizer.createRole(admins);
authorizer.createRole(engineers);
 authorizer.createRole(admins);
 Assert.fail(String.format("Created a role %s which already exists. Should have failed.", admins.getName()));
} catch (AlreadyExistsException expected) {
co.cask.cdap.security.spi.authorizationAuthorizercreateRole

Javadoc

Create a role.

Popular methods of Authorizer

  • grant
  • listPrivileges
  • revoke
  • enforce
  • addRoleToPrincipal
    Add a role to the specified Principal.
  • dropRole
    Drop a role.
  • isVisible
  • listAllRoles
    Returns all available Role. Only a super user can perform this operation.
  • listRoles
    Returns a set of all Role for the specified Principal.
  • removeRoleFromPrincipal
    Delete a role from the specified Principal.
  • destroy
    Destroys an Authorizer. Authorization extensions can use this method to write any cleanup code.
  • initialize
    Initialize the Authorizer. Authorization extensions can use this method to access an AuthorizationCo
  • destroy,
  • initialize

Popular in Java

  • Creating JSON documents from java classes using gson
  • startActivity (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now