Tabnine Logo
MSentryRole.getGmPrivileges
Code IndexAdd Tabnine to your IDE (free)

How to use
getGmPrivileges
method
in
org.apache.sentry.provider.db.service.model.MSentryRole

Best Java code snippets using org.apache.sentry.provider.db.service.model.MSentryRole.getGmPrivileges (Showing top 13 results out of 315)

origin: apache/sentry

/**
 * Removes all the privileges associated with
 * a particular role. After this dis-association if the
 * privilege doesn't have any roles associated it will be
 * removed from the underlying persistence layer.
 * @param pm Instance of PersistenceManager
 * @param sentryRole Role for which all the privileges are to be removed.
 */
private void removePrivileges(PersistenceManager pm, MSentryRole sentryRole) {
 List<MSentryPrivilege> privilegesCopy = new ArrayList<>(sentryRole.getPrivileges());
 List<MSentryGMPrivilege> gmPrivilegesCopy = new ArrayList<>(sentryRole.getGmPrivileges());
 sentryRole.removePrivileges();
 // with SENTRY-398 generic model
 sentryRole.removeGMPrivileges();
 removeStaledPrivileges(pm, privilegesCopy);
 removeStaledGMPrivileges(pm, gmPrivilegesCopy);
}
origin: apache/sentry

 grantPrivilege.setAction(ac.getValue());
 MSentryGMPrivilege existPriv = getPrivilege(grantPrivilege, pm);
 if (existPriv != null && role.getGmPrivileges().contains(existPriv)) {
if (allPrivilege != null && role.getGmPrivileges().contains(allPrivilege)) {
 return;
origin: apache/incubator-sentry

 grantPrivilege.setAction(ac.getValue());
 MSentryGMPrivilege existPriv = getPrivilege(grantPrivilege, pm);
 if (existPriv != null && role.getGmPrivileges().contains(existPriv)) {
if (allPrivilege != null && role.getGmPrivileges().contains(allPrivilege)) {
 return;
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
solrPrivilege = (MSentryGMPrivilege)role.getGmPrivileges().toArray()[0];
solrPrivilege.removeRole(role);
pm.makePersistent(solrPrivilege);
pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(0, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/incubator-sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
solrPrivilege = (MSentryGMPrivilege)role.getGmPrivileges().toArray()[0];
solrPrivilege.removeRole(role);
pm.makePersistent(solrPrivilege);
pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(0, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/incubator-sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/incubator-sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
role = getMSentryRole(pm, roleName);
pm.retrieve(role);
if (!role.getGmPrivileges().contains(solrPrivilege2)) {
 fail("unexpect happend: the MSentryGMPrivilege:" + solrPrivilege2 + " already be granted");
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
role = getMSentryRole(pm, roleName);
pm.retrieve(role);
if (!role.getGmPrivileges().contains(solrPrivilege2)) {
 fail("unexpect happend: the MSentryGMPrivilege:" + solrPrivilege2 + " already be granted");
origin: apache/incubator-sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(0, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/sentry

pm.retrieve(role1);
assertEquals(1, role1.getPrivileges().size());
assertEquals(1, role1.getGmPrivileges().size());
role2 = getMSentryRole(pm, roleName2);
pm.retrieve(role2);
assertEquals(1, role2.getPrivileges().size());
assertEquals(1, role2.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
pm.retrieve(role);
assertEquals(0, role.getPrivileges().size());
assertEquals(0, role.getGmPrivileges().size());
commitTransaction(pm);
origin: apache/sentry

pm.retrieve(role);
assertEquals(1, role.getPrivileges().size());
assertEquals(1, role.getGmPrivileges().size());
commitTransaction(pm);
org.apache.sentry.provider.db.service.modelMSentryRolegetGmPrivileges

Popular methods of MSentryRole

  • <init>
  • getGroups
  • getPrivileges
  • removeGMPrivileges
  • removePrivileges
  • getRoleName
  • appendGMPrivilege
  • appendGroup
  • getUsers
  • removeGMPrivilege
  • removeGroup
  • appendPrivilege
  • removeGroup,
  • appendPrivilege,
  • appendUser,
  • removePrivilege,
  • removeUser

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • setScale (BigDecimal)
  • setContentView (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top PhpStorm 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