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

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

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

origin: cdapio/cdap

@Path("/{principal-type}/{principal-name}/roles/{role-name}")
@DELETE
public void removeRoleFromPrincipal(HttpRequest httpRequest, HttpResponder httpResponder,
                  @PathParam("principal-type") String principalType,
                  @PathParam("principal-name") String principalName,
                  @PathParam("role-name") String roleName) throws Exception {
 ensureSecurityEnabled();
 Principal principal = new Principal(principalName, Principal.PrincipalType.valueOf(principalType.toUpperCase()));
 authorizer.removeRoleFromPrincipal(new Role(roleName), principal);
 httpResponder.sendStatus(HttpResponseStatus.OK);
 createLogEntry(httpRequest, HttpResponseStatus.OK);
}
origin: co.cask.cdap/cdap-app-fabric

@Path("/{principal-type}/{principal-name}/roles/{role-name}")
@DELETE
public void removeRoleFromPrincipal(HttpRequest httpRequest, HttpResponder httpResponder,
                  @PathParam("principal-type") String principalType,
                  @PathParam("principal-name") String principalName,
                  @PathParam("role-name") String roleName) throws Exception {
 ensureSecurityEnabled();
 Principal principal = new Principal(principalName, Principal.PrincipalType.valueOf(principalType.toUpperCase()));
 authorizer.removeRoleFromPrincipal(new Role(roleName), principal);
 httpResponder.sendStatus(HttpResponseStatus.OK);
 createLogEntry(httpRequest, HttpResponseStatus.OK);
}
origin: cdapio/cdap

authorizer.removeRoleFromPrincipal(engineers, spiderman);
 authorizer.removeRoleFromPrincipal(admins, spiderman);
 Assert.fail(String.format("Removed non-existing role %s from principal %s. Should have failed.", admins,
              spiderman));
co.cask.cdap.security.spi.authorizationAuthorizerremoveRoleFromPrincipal

Javadoc

Delete a role from the specified Principal.

Popular methods of Authorizer

  • grant
  • listPrivileges
  • revoke
  • enforce
  • addRoleToPrincipal
    Add a role to the specified Principal.
  • createRole
    Create a role.
  • 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.
  • 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

  • Reading from database using SQL prepared statement
  • getSharedPreferences (Context)
  • compareTo (BigDecimal)
  • getContentResolver (Context)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • JPanel (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Github Copilot alternatives
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