From d7a8171d57387d423a6fce1bf31743bb86c92af1 Mon Sep 17 00:00:00 2001 From: Javier Ferrer Date: Mon, 23 May 2022 10:41:43 +0200 Subject: [PATCH 1/2] CERN-specific features config flag --- changelog/unreleased/enhancement-cern-features | 5 +++++ docs/getting-started.md | 1 + packages/web-runtime/src/store/config.js | 1 + 3 files changed, 7 insertions(+) create mode 100644 changelog/unreleased/enhancement-cern-features diff --git a/changelog/unreleased/enhancement-cern-features b/changelog/unreleased/enhancement-cern-features new file mode 100644 index 00000000000..e16484cf634 --- /dev/null +++ b/changelog/unreleased/enhancement-cern-features @@ -0,0 +1,5 @@ +Enhancement: CERN features setting + +We've added a flag to enable CERN-specific features + +https://github.com/owncloud/web/pull/7034 diff --git a/docs/getting-started.md b/docs/getting-started.md index 5cef8c56639..f4745dd5a39 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -57,6 +57,7 @@ substring of a value of the authenticated user. Examples are `/Shares`, `/{{.Id} - `options.sharingRecipientsPerPage` Sets the amount of users shown as recipients in the dropdown when sharing resources. Default amount is 200. - `options.sidebar.shares.showAllOnLoad` Sets the list of (link) shares list in the sidebar to be initially expanded (default is a collapsed state, only showing the first three shares). - `options.runningOnEos` Set this option to `true` if running on an [EOS storage backend](https://eos-web.web.cern.ch/eos-web/) to enable its specific features. Defaults to `false`. +- `options.cernFeatures` Enabling this will activate CERN-specific features. Defaults to `false`. ### Sentry diff --git a/packages/web-runtime/src/store/config.js b/packages/web-runtime/src/store/config.js index a39f4d6e939..f0eb9ba7d35 100644 --- a/packages/web-runtime/src/store/config.js +++ b/packages/web-runtime/src/store/config.js @@ -49,6 +49,7 @@ const state = { }, previewFileExtensions: [], runningOnEos: false, + cernFeatures: false, sharingRecipientsPerPage: 200 } } From 83e40fff9c76528f42706e210ed903e53692d359 Mon Sep 17 00:00:00 2001 From: Javier Ferrer Date: Mon, 23 May 2022 10:41:59 +0200 Subject: [PATCH 2/2] CERN-specific share tooltip captions --- ...nhancement-cern-specific-help-in-shares-tooltip | 5 +++++ .../InviteCollaborator/InviteCollaboratorForm.vue | 14 ++++++++++++-- .../web-app-files/src/helpers/contextualHelpers.js | 7 +++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 changelog/unreleased/enhancement-cern-specific-help-in-shares-tooltip diff --git a/changelog/unreleased/enhancement-cern-specific-help-in-shares-tooltip b/changelog/unreleased/enhancement-cern-specific-help-in-shares-tooltip new file mode 100644 index 00000000000..449638933e5 --- /dev/null +++ b/changelog/unreleased/enhancement-cern-specific-help-in-shares-tooltip @@ -0,0 +1,5 @@ +Enhancement: CERN-specific help in shares tooltip + +We've added some CERN-related help strings to the share tooltip. + +https://github.com/owncloud/web/pull/7034 diff --git a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue index fd38e0d039f..52251275292 100644 --- a/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue +++ b/packages/web-app-files/src/components/SideBar/Shares/Collaborators/InviteCollaborator/InviteCollaboratorForm.vue @@ -95,6 +95,7 @@ import { clientService } from 'web-pkg/src/services' import { useCapabilityFilesSharingResharing } from 'web-pkg/src/composables' import { shareInviteCollaboratorHelp, + shareInviteCollaboratorHelpCern, shareSpaceAddMemberHelp } from '../../../../../helpers/contextualHelpers.js' @@ -147,7 +148,13 @@ export default { }, inviteCollaboratorHelp() { - return shareInviteCollaboratorHelp + const cernFeatures = !!this.configuration?.options?.cernFeatures + return cernFeatures + ? { + text: shareInviteCollaboratorHelp.text, + list: [...shareInviteCollaboratorHelp.list, ...shareInviteCollaboratorHelpCern.list] + } + : shareInviteCollaboratorHelp }, spaceAddMemberHelp() { @@ -158,7 +165,10 @@ export default { if (this.capabilities.files_sharing.federation?.outgoing === true) { return this.$gettext('Add new person by name, email or federation IDs') } - return this.$gettext('Add new person by name or email') + const cernFeatures = !!this.configuration?.options?.cernFeatures + return cernFeatures + ? this.$gettext('Add new person by name, email or service/secondary/guest accounts') + : this.$gettext('Add new person by name or email') }, $_announcementWhenCollaboratorAdded() { diff --git a/packages/web-app-files/src/helpers/contextualHelpers.js b/packages/web-app-files/src/helpers/contextualHelpers.js index 2d16c7a47d2..19ebd178864 100644 --- a/packages/web-app-files/src/helpers/contextualHelpers.js +++ b/packages/web-app-files/src/helpers/contextualHelpers.js @@ -17,6 +17,13 @@ export const shareInviteCollaboratorHelp = { $gettext('Invited persons can not see who else has access') ] } +export const shareInviteCollaboratorHelpCern = { + list: [ + $gettext( + 'To search for service or secondary accounts prefix the username with "a:" (like "a:doe") and for guest accounts prefix the username with "l:" (like "l:doe")' + ) + ] +} export const shareSpaceAddMemberHelp = { text: $gettext('Add persons or groups as members to this Space. Members are allowed to:'), list: [