Skip to content

Commit 0ef98e3

Browse files
provokateurinicewind1991
authored andcommitted
fix(Share20): Use correct enum for share permissions
Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent 4e7d6e3 commit 0ef98e3

4 files changed

Lines changed: 4 additions & 10 deletions

File tree

‎apps/sharing/lib/AppInfo/Application.php‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99

1010
namespace OCA\Sharing\AppInfo;
1111

12-
use NCU\Sharing\ISharingRegistry;
13-
use OC\Sharing\SharingBackend;
1412
use OCA\Sharing\Capabilities;
1513
use OCA\Sharing\Middleware\ShareApiEnabledMiddleware;
1614
use OCP\AppFramework\App;

‎lib/private/Share20/Share.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class Share implements IShare {
4444
private $sharedBy;
4545
/** @var string */
4646
private $shareOwner;
47-
/** @var int */
47+
/** @var int-mask-of<Constants::PERMISSION_*> */
4848
private $permissions;
4949
/** @var IAttributes */
5050
private $attributes;

‎lib/private/Sharing/SharingBackend.php‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
use OCP\IUser;
3737
use OCP\IUserManager;
3838
use OCP\L10N\IFactory;
39-
use OCP\Snowflake\ISnowflakeGenerator;
4039
use RuntimeException;
4140

4241
// TODO: Add mapping table for class names in sources, recipients, permissions and properties

‎lib/public/Share/IShare.php‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
namespace OCP\Share;
1010

1111
use OCP\AppFramework\Attribute\Consumable;
12+
use OCP\Constants;
1213
use OCP\Files\Cache\ICacheEntry;
13-
use OCP\Files\File;
14-
use OCP\Files\Folder;
1514
use OCP\Files\Node;
1615
use OCP\Files\NotFoundException;
1716
use OCP\Share\Exceptions\IllegalIDChangeException;
@@ -276,19 +275,17 @@ public function getSharedWithAvatar();
276275

277276
/**
278277
* Set the permissions.
279-
* See \OCP\Constants::PERMISSION_*
280278
*
281-
* @param int $permissions
279+
* @param int-mask-of<Constants::PERMISSION_*> $permissions
282280
* @return IShare The modified object
283281
* @since 9.0.0
284282
*/
285283
public function setPermissions($permissions);
286284

287285
/**
288286
* Get the share permissions
289-
* See \OCP\Constants::PERMISSION_*
290287
*
291-
* @return int
288+
* @return int-mask-of<Constants::PERMISSION_*>
292289
* @since 9.0.0
293290
*/
294291
public function getPermissions();

0 commit comments

Comments
 (0)