You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "rujia (Jira)" <ji...@apache.org> on 2020/10/16 08:42:00 UTC

[jira] [Updated] (RANGER-3042) plugin-presto: some log issues should be fixed

     [ https://issues.apache.org/jira/browse/RANGER-3042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

rujia updated RANGER-3042:
--------------------------
    Description: 
some log issues should be fixed about log or exception about presto plugin

 
{code:java}
  @Override
  public void checkCanDropView(SystemSecurityContext context, CatalogSchemaTableName view) {
    if (!hasPermission(createResource(view), context, PrestoAccessType.DROP)) {
      LOG.debug("RangerSystemAccessControl.checkCanDropView(" + view.getSchemaTableName().getTableName() + ") denied");
      AccessDeniedException.*denyCreateView*(view.getSchemaTableName().getTableName());
    }
  }

  [~Override]
  public void checkCanSetCatalogSessionProperty(SystemSecurityContext context, String catalogName, String propertyName) {
    if (!hasPermission(createCatalogSessionResource(catalogName, propertyName), context, PrestoAccessType.ALTER)) {
      LOG.debug("RangerSystemAccessControl.checkCanSetSystemSessionProperty{color}(" + catalogName + ") denied");
      AccessDeniedException.denySetCatalogSessionProperty(catalogName, propertyName);
    }
  }
{code}


  was:
some log issues should be fixed about log or exception about presto plugin

 
{code:java}
  @Override
  public void checkCanDropView(SystemSecurityContext context, CatalogSchemaTableName view) {
    if (!hasPermission(createResource(view), context, PrestoAccessType.DROP)) {
      LOG.debug("RangerSystemAccessControl.checkCanDropView(" + view.getSchemaTableName().getTableName() + ") denied");
      AccessDeniedException.{color:#DE350B}denyCreateView{color}(view.getSchemaTableName().getTableName());
    }
  }

  @Override
  public void checkCanSetCatalogSessionProperty(SystemSecurityContext context, String catalogName, String propertyName) {
    if (!hasPermission(createCatalogSessionResource(catalogName, propertyName), context, PrestoAccessType.ALTER)) {
      LOG.debug("RangerSystemAccessControl.{color:#DE350B}checkCanSetSystemSessionProperty{color}(" + catalogName + ") denied");
      AccessDeniedException.denySetCatalogSessionProperty(catalogName, propertyName);
    }
  }
{code}



> plugin-presto: some log issues should be fixed
> ----------------------------------------------
>
>                 Key: RANGER-3042
>                 URL: https://issues.apache.org/jira/browse/RANGER-3042
>             Project: Ranger
>          Issue Type: Bug
>          Components: plugins
>    Affects Versions: 2.0.0, 2.1.0
>            Reporter: rujia
>            Priority: Minor
>
> some log issues should be fixed about log or exception about presto plugin
>  
> {code:java}
>   @Override
>   public void checkCanDropView(SystemSecurityContext context, CatalogSchemaTableName view) {
>     if (!hasPermission(createResource(view), context, PrestoAccessType.DROP)) {
>       LOG.debug("RangerSystemAccessControl.checkCanDropView(" + view.getSchemaTableName().getTableName() + ") denied");
>       AccessDeniedException.*denyCreateView*(view.getSchemaTableName().getTableName());
>     }
>   }
>   [~Override]
>   public void checkCanSetCatalogSessionProperty(SystemSecurityContext context, String catalogName, String propertyName) {
>     if (!hasPermission(createCatalogSessionResource(catalogName, propertyName), context, PrestoAccessType.ALTER)) {
>       LOG.debug("RangerSystemAccessControl.checkCanSetSystemSessionProperty{color}(" + catalogName + ") denied");
>       AccessDeniedException.denySetCatalogSessionProperty(catalogName, propertyName);
>     }
>   }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)