Skip to content

Commit e8a22a7

Browse files
committed
fix(Share20): Use correct enum for share permissions
Signed-off-by: provokateurin <kate@provokateurin.de>
1 parent 1f9327c commit e8a22a7

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

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/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)