private void permissionTopLevelFolder( CallContext context, String repositoryId, String key, Content content) { boolean result = permissionService.checkPermissionAtTopLevel(context, repositoryId, key, content); if (!result) { String msg = String.format( "Permission Denied to top level folders for non-admin user! repositoryId=%s key=%s userId=%s content={id:%s, name:%s} ", repositoryId, key, context.getUsername(), content.getId(), content.getName()); throw new CmisPermissionDeniedException(msg, HTTP_STATUS_CODE_403); } }
private void permissionDeniedInternal( CallContext callContext, String repositoryId, String key, Acl acl, String baseTypeId, Content content) { if (!permissionService.checkPermission( callContext, repositoryId, key, acl, baseTypeId, content)) { String msg = String.format( "Permission Denied! repositoryId=%s key=%s acl=%s content={id:%s, name:%s} ", repositoryId, key, acl, content.getId(), content.getName()); throw new CmisPermissionDeniedException(msg, HTTP_STATUS_CODE_403); } }