diff options
author | Carl Schwan <carl@carlschwan.eu> | 2021-07-22 12:41:29 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2021-09-29 22:43:31 +0300 |
commit | 6958d8005ae3b86759f49746564bf7238456be52 (patch) | |
tree | aab851e09351c631129e4729aa49c03533ce6180 /apps/settings/src/components/AdminDelegating.vue | |
parent | ee987d74303cb38b864f96660cd2ee6d6552ebfd (diff) |
Add admin privilege delegation for admin settings
This makes it possible for selected groups to access some settings
pages.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/settings/src/components/AdminDelegating.vue')
-rw-r--r-- | apps/settings/src/components/AdminDelegating.vue | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/apps/settings/src/components/AdminDelegating.vue b/apps/settings/src/components/AdminDelegating.vue new file mode 100644 index 00000000000..c32da671adc --- /dev/null +++ b/apps/settings/src/components/AdminDelegating.vue @@ -0,0 +1,37 @@ +<template> + <div id="admin-right-sub-granting" class="section"> + <h2>{{ t('settings', 'Admin right privilege') }}</h2> + <p class="settings-hint"> + {{ t('settings', 'Here you can decide which group can access some of the admin settings.') }} + </p> + + <div class="setting-list"> + <div v-for="setting in availableSettings" :key="setting.class"> + <h3>{{ setting.sectionName }}</h3> + <GroupSelect :available-groups="availableGroups" :authorized-groups="authorizedGroups" :setting="setting" /> + </div> + </div> + </div> +</template> + +<script> +import GroupSelect from './AdminDelegation/GroupSelect' +import { loadState } from '@nextcloud/initial-state' + +export default { + name: 'AdminDelegating', + components: { + GroupSelect, + }, + data() { + const availableSettings = loadState('settings', 'available-settings') + const availableGroups = loadState('settings', 'available-groups') + const authorizedGroups = loadState('settings', 'authorized-groups') + return { + availableSettings, + availableGroups, + authorizedGroups, + } + }, +} +</script> |