mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
fix(files_sharing): Disable sharing status action for public shares
This is disabled to not leak personal information into the public Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
1d16bc47ff
commit
3134053497
1 changed files with 7 additions and 1 deletions
|
|
@ -2,16 +2,17 @@
|
|||
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
*/
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
import { Node, View, registerFileAction, FileAction, Permission } from '@nextcloud/files'
|
||||
import { translate as t } from '@nextcloud/l10n'
|
||||
import { ShareType } from '@nextcloud/sharing'
|
||||
import { isPublicShare } from '@nextcloud/sharing/public'
|
||||
|
||||
import AccountGroupSvg from '@mdi/svg/svg/account-group.svg?raw'
|
||||
import AccountPlusSvg from '@mdi/svg/svg/account-plus.svg?raw'
|
||||
import LinkSvg from '@mdi/svg/svg/link.svg?raw'
|
||||
import CircleSvg from '../../../../core/img/apps/circles.svg?raw'
|
||||
|
||||
import { getCurrentUser } from '@nextcloud/auth'
|
||||
import { action as sidebarAction } from '../../../files/src/actions/sidebarAction'
|
||||
import { generateAvatarSvg } from '../utils/AccountIcon'
|
||||
|
||||
|
|
@ -103,6 +104,11 @@ export const action = new FileAction({
|
|||
return false
|
||||
}
|
||||
|
||||
// Do not leak information about users to public shares
|
||||
if (isPublicShare()) {
|
||||
return false
|
||||
}
|
||||
|
||||
const node = nodes[0]
|
||||
const shareTypes = node.attributes?.['share-types']
|
||||
const isMixed = Array.isArray(shareTypes) && shareTypes.length > 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue