From 464e1fc6c7f71bb203b267a2dee05615c9af8b5e Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Wed, 8 Jan 2020 15:37:30 +0200 Subject: [PATCH] Added flex page permissions to the blueprints (for admin) --- system/blueprints/flex/accounts.yaml | 2 +- .../pages/partials/permissions.yaml | 69 +++++++++++++++++-- 2 files changed, 66 insertions(+), 5 deletions(-) diff --git a/system/blueprints/flex/accounts.yaml b/system/blueprints/flex/accounts.yaml index 194f7d025..6e88e7476 100644 --- a/system/blueprints/flex/accounts.yaml +++ b/system/blueprints/flex/accounts.yaml @@ -17,7 +17,7 @@ config: route: '/accounts' title: PLUGIN_ADMIN.USER_ACCOUNTS icon: fa-user - authorize: ['admin.users', 'admin.accounts', 'admin.super'] + authorize: ['admin.users', 'admin.accounts'] priority: 6 # Admin template type (folder) diff --git a/system/blueprints/pages/partials/permissions.yaml b/system/blueprints/pages/partials/permissions.yaml index 840251ea1..3ce6a06b7 100644 --- a/system/blueprints/pages/partials/permissions.yaml +++ b/system/blueprints/pages/partials/permissions.yaml @@ -1,6 +1,67 @@ form: fields: - permissions: - type: text - label: PLUGIN_ADMIN.PERMISSIONS - placeholder: Placeholder... Coming soon.. + _site: + type: section + title: PLUGIN_ADMIN.SITE + underline: true + + fields: + + header.visibility_requires_access: + type: toggle + toggleable: true + label: PLUGIN_ADMIN.PAGE_VISIBILITY_REQUIRES_ACCESS + help: PLUGIN_ADMIN.PAGE_VISIBILITY_REQUIRES_ACCESS_HELP + highlight: 0 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + header.access: + type: permissions + toggleable: true + label: PLUGIN_ADMIN.PAGE_ACCESS + help: PLUGIN_ADMIN.PAGE_ACCESS_HELP + ignore_empty: true + validate: + type: array + value_type: bool + + _admin: + type: section + title: PLUGIN_ADMIN.ADMIN + underline: true + + fields: + + header.permissions.inherit: + type: toggle + toggleable: true + label: PLUGIN_ADMIN.PAGE_INHERIT_PERMISSIONS + help: PLUGIN_ADMIN.PAGE_INHERIT_PERMISSIONS_HELP + highlight: 1 + options: + 1: PLUGIN_ADMIN.YES + 0: PLUGIN_ADMIN.NO + validate: + type: bool + + header.permissions.authors: + type: list + toggleable: true + label: PLUGIN_ADMIN.PAGE_AUTHORS + help: PLUGIN_ADMIN.PAGE_AUTHORS_HELP + + fields: + value: + type: text + placeholder: PLUGIN_ADMIN.USERNAME + style: vertical + + header.permissions.groups: + type: array + toggleable: true + label: PLUGIN_ADMIN.PAGE_GROUPS + help: PLUGIN_ADMIN.PAGE_GROUPS_HELP