aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/src/utils/NodeShareUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/src/utils/NodeShareUtils.ts')
-rw-r--r--apps/files_sharing/src/utils/NodeShareUtils.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/src/utils/NodeShareUtils.ts b/apps/files_sharing/src/utils/NodeShareUtils.ts
index 7c51e3add69..f14f981e2ad 100644
--- a/apps/files_sharing/src/utils/NodeShareUtils.ts
+++ b/apps/files_sharing/src/utils/NodeShareUtils.ts
@@ -5,7 +5,7 @@
import { getCurrentUser } from '@nextcloud/auth'
import type { Node } from '@nextcloud/files'
-import { Type } from '@nextcloud/sharing'
+import { ShareType } from '@nextcloud/sharing'
type Share = {
/** The recipient display name */
@@ -13,7 +13,7 @@ type Share = {
/** The recipient user id */
id: string
/** The share type */
- type: Type
+ type: ShareType
}
const getSharesAttribute = function(node: Node) {
@@ -31,10 +31,10 @@ export const isNodeSharedWithMe = function(node: Node) {
return shares.length > 0 && (
// If some shares are shared with you as a direct user share
- shares.some(share => share.id === uid && share.type === Type.SHARE_TYPE_USER)
+ shares.some(share => share.id === uid && share.type === ShareType.User)
// Or of the file is shared with a group you're in
// (if it's returned by the backend, we assume you're in it)
- || shares.some(share => share.type === Type.SHARE_TYPE_GROUP)
+ || shares.some(share => share.type === ShareType.Group)
)
}
@@ -49,7 +49,7 @@ export const isNodeSharedWithOthers = function(node: Node) {
return shares.length > 0
// If some shares are shared with you as a direct user share
- && shares.some(share => share.id !== uid && share.type !== Type.SHARE_TYPE_GROUP)
+ && shares.some(share => share.id !== uid && share.type !== ShareType.Group)
}
export const isNodeShared = function(node: Node) {