Files
wekan/client/components/settings/adminFeatures.jade
T
Lauri Ojansivu f1cc8daebf Admin Panel / Features / Notifications: GDPR activity/notification controls (#5820)
New Notifications category with three GDPR toggles (all default off), enforced
server-side:

- Disable all activities: activity-feed entries are neither recorded
  (Activities.before.insert returns false to cancel) nor shown (the activities
  publication returns nothing, hiding existing and new entries).
- Disable all notifications: the Activities.after.insert dispatch hook returns
  early, so no watch notifications are sent; activity recording is unaffected.
- Disable watch: the watch() method rejects any watch-level change, and the board
  header watch button is hidden.

A synchronously-readable server cache (models/lib/featureFlags.js, kept current by
a Settings observer) lets the sync before.insert hook read the flags without
awaiting. Adds settings disableActivities, disableNotifications, disableWatch,
published in the public setting, plus global Blaze helpers activitiesDisabled /
watchDisabled for UI hiding.
2026-07-14 14:00:49 +03:00

102 lines
4.7 KiB
Plaintext

template(name="adminFeatures")
.setting-content
unless currentUser.isAdmin
| {{_ 'error-notAuthorized'}}
else
.content-title.ext-box
span
span.emoji-icon
i.fa.fa-flask
| {{_ 'features'}}
.content-body
.side-menu
ul
li(class="{{#if isPerformanceActive}}active{{/if}}")
a.js-features-menu(data-id="performance")
span.emoji-icon
i.fa.fa-tachometer
| {{_ 'features-performance'}}
li(class="{{#if isSecurityActive}}active{{/if}}")
a.js-features-menu(data-id="security")
span.emoji-icon
i.fa.fa-shield
| {{_ 'features-security'}}
li(class="{{#if isNotificationsActive}}active{{/if}}")
a.js-features-menu(data-id="notifications")
span.emoji-icon
i.fa.fa-bell
| {{_ 'features-notifications'}}
.main-body
if isPerformanceActive
ul.setting-detail
li.layout-form
.title {{_ 'cards-loading'}}
.form-group
select#cards-loading.js-cards-loading
each cardsLoadingOptions
if this.selected
option(value="{{value}}" selected) {{_ label}}
else
option(value="{{value}}") {{_ label}}
p.description {{_ 'cards-loading-description'}}
p.description {{_ 'cards-loading-lazy-note'}}
if isSecurityActive
ul.setting-detail
li
a.flex.js-toggle-render-links-as-plain-text
.materialCheckBox(class="{{#if renderLinksAsPlainText}}is-checked{{/if}}")
span {{_ 'render-links-as-plain-text'}}
p.description {{_ 'render-links-as-plain-text-description'}}
li
a.flex.js-toggle-always-show-code-as-text
.materialCheckBox(class="{{#if alwaysShowCodeAsText}}is-checked{{/if}}")
span {{_ 'always-show-code-as-text'}}
p.description {{_ 'always-show-code-as-text-description'}}
li
a.flex.js-toggle-disable-all-import
.materialCheckBox(class="{{#if disableAllImport}}is-checked{{/if}}")
span {{_ 'disable-all-import'}}
p.description {{_ 'disable-all-import-description'}}
li
a.flex.js-toggle-disable-all-export
.materialCheckBox(class="{{#if disableAllExport}}is-checked{{/if}}")
span {{_ 'disable-all-export'}}
p.description {{_ 'disable-all-export-description'}}
li
a.flex.js-toggle-disable-import-avatars
.materialCheckBox(class="{{#if disableImportAvatars}}is-checked{{/if}}")
span {{_ 'disable-import-avatars'}}
p.description {{_ 'disable-import-avatars-description'}}
li
a.flex.js-toggle-disable-export-avatars
.materialCheckBox(class="{{#if disableExportAvatars}}is-checked{{/if}}")
span {{_ 'disable-export-avatars'}}
p.description {{_ 'disable-export-avatars-description'}}
li
a.flex.js-toggle-anonymize-import-users
.materialCheckBox(class="{{#if anonymizeImportUsers}}is-checked{{/if}}")
span {{_ 'anonymize-import-users'}}
p.description {{_ 'anonymize-import-users-description'}}
li
a.flex.js-toggle-anonymize-export-users
.materialCheckBox(class="{{#if anonymizeExportUsers}}is-checked{{/if}}")
span {{_ 'anonymize-export-users'}}
p.description {{_ 'anonymize-export-users-description'}}
if isNotificationsActive
ul.setting-detail
li
a.flex.js-toggle-disable-activities
.materialCheckBox(class="{{#if disableActivities}}is-checked{{/if}}")
span {{_ 'disable-activities'}}
p.description {{_ 'disable-activities-description'}}
li
a.flex.js-toggle-disable-notifications
.materialCheckBox(class="{{#if disableNotifications}}is-checked{{/if}}")
span {{_ 'disable-notifications'}}
p.description {{_ 'disable-notifications-description'}}
li
a.flex.js-toggle-disable-watch
.materialCheckBox(class="{{#if disableWatch}}is-checked{{/if}}")
span {{_ 'disable-watch'}}
p.description {{_ 'disable-watch-description'}}