Revert "fix: Add method to map board to file permissions"
This reverts commit cfc804ad21.
This commit is contained in:
@@ -19,7 +19,6 @@ use OCA\Deck\NoPermissionException;
|
|||||||
use OCP\AppFramework\Db\DoesNotExistException;
|
use OCP\AppFramework\Db\DoesNotExistException;
|
||||||
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
|
use OCP\AppFramework\Db\MultipleObjectsReturnedException;
|
||||||
use OCP\Cache\CappedMemoryCache;
|
use OCP\Cache\CappedMemoryCache;
|
||||||
use OCP\Constants;
|
|
||||||
use OCP\IConfig;
|
use OCP\IConfig;
|
||||||
use OCP\IGroupManager;
|
use OCP\IGroupManager;
|
||||||
use OCP\IUserManager;
|
use OCP\IUserManager;
|
||||||
@@ -133,20 +132,6 @@ class PermissionService {
|
|||||||
throw new NoPermissionException('Permission denied');
|
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
|
* @param $boardId
|
||||||
* @return bool
|
* @return bool
|
||||||
|
|||||||
Reference in New Issue
Block a user