lib/src/main/java/edu/utexas/tacc/tapis/files/lib/utils/Utils.java
public static void checkPermitted(FilePermsService svc, String oboTenant, String oboUser, String systemId,
                                    String pathToCheck, String pathToLog, Permission perm)
          throws ForbiddenException, ServiceException
  {
    if (!svc.isPermitted(oboTenant, oboUser, systemId, pathToCheck, perm)) {
      String msg = Utils.getMsg("FILES_NOT_AUTHORIZED", oboTenant, oboUser, systemId, pathToLog);
      throw new ForbiddenException(msg);
    }
  }
/**
   * Standard perms check and throw given obo tenant+user, system, path, perm required.
   * @param svc - Perms service
   * @param oboTenant - obo tenant
   * @param oboUser - obo user
   * @param systemId - system
   * @param pathToCheck - path to use during check
   * @param pathToLog - path to use for log message
   * @param perm - perm to check for
   * @throws NotAuthorizedException - perm check failed
   * @throws ServiceException - other exceptions
   */
Standard perms check and throw given obo tenant+user, system, path, perm required.
Standard perms check and throw given obo tenant + user system path perm required .
public static void checkPermitted(FilePermsService svc, String oboTenant, String oboUser, String systemId,
                                    String pathToCheck, String pathToLog, Permission perm)
          throws ForbiddenException, ServiceException
  {
    if (!svc.isPermitted(oboTenant, oboUser, systemId, pathToCheck, perm)) {
      String msg = Utils.getMsg("FILES_NOT_AUTHORIZED", oboTenant, oboUser, systemId, pathToLog);
      throw new ForbiddenException(msg);
    }
  }
public static void checkPermitted ( FilePermsService svc , String oboTenant , String oboUser , String systemId , String pathToCheck , String pathToLog , Permission perm ) throws ForbiddenException , ServiceException { if ( ! svc . isPermitted ( oboTenant , oboUser , systemId , pathToCheck , perm ) ) { String msg = Utils . getMsg ( "FILES_NOT_AUTHORIZED" , oboTenant , oboUser , systemId , pathToLog ) ; throw new ForbiddenException ( msg ) ; } }
Standard perms check and throw given obo tenant+user, system, path, perm required.
Standard perms check and throw given obo tenant + user system path perm required .