Skip to content

Commit

Permalink
Revert "fix: Add method to map board to file permissions"
Browse files Browse the repository at this point in the history
This reverts commit cfc804a.
  • Loading branch information
juliusknorr committed Dec 19, 2024
1 parent dec47f6 commit b3e3588
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions lib/Service/PermissionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use OCP\AppFramework\Db\DoesNotExistException;
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\Cache\CappedMemoryCache;
use OCP\Constants;
use OCP\IConfig;
use OCP\IGroupManager;
use OCP\IUserManager;
Expand Down Expand Up @@ -133,20 +132,6 @@ public function checkPermission(?IPermissionMapper $mapper, $id, int $permission
throw new NoPermissionException('Permission denied');
}

public function boardToFilePermission(array $permissions): int {
$result = 0;
foreach ($permissions as $key => $value) {
$result |= $value ? match ($key) {
Acl::PERMISSION_READ => Constants::PERMISSION_READ,
Acl::PERMISSION_EDIT => Constants::PERMISSION_UPDATE | Constants::PERMISSION_DELETE | Constants::PERMISSION_CREATE | Constants::PERMISSION_DELETE,
Acl::PERMISSION_SHARE => Constants::PERMISSION_SHARE,
default => 0,
} : 0;
}

return $result;
}

/**
* @param $boardId
* @return bool
Expand Down

0 comments on commit b3e3588

Please sign in to comment.