aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/src/actions/openInFilesAction.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_external/src/actions/openInFilesAction.ts')
-rw-r--r--apps/files_external/src/actions/openInFilesAction.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_external/src/actions/openInFilesAction.ts b/apps/files_external/src/actions/openInFilesAction.ts
index 62fdd394bb2..e5f065e4871 100644
--- a/apps/files_external/src/actions/openInFilesAction.ts
+++ b/apps/files_external/src/actions/openInFilesAction.ts
@@ -10,6 +10,7 @@ import { translate as t } from '@nextcloud/l10n'
import { FileAction, DefaultType } from '@nextcloud/files'
import { STORAGE_STATUS } from '../utils/credentialsUtils'
+import { getCurrentUser } from '@nextcloud/auth'
export const action = new FileAction({
id: 'open-in-files-external-storage',
@@ -32,7 +33,7 @@ export const action = new FileAction({
t('files_external', 'External mount error'),
(redirect) => {
if (redirect === true) {
- const scope = node.attributes.scope === 'personal' ? 'user' : 'admin'
+ const scope = getCurrentUser()?.isAdmin ? 'admin' : 'user'
window.location.href = generateUrl(`/settings/${scope}/externalstorages`)
}
},