Skip to content

Commit

Permalink
feat(Permissions): Allow permission RBAC for sylius plus on routes
Browse files Browse the repository at this point in the history
  • Loading branch information
etienne-monsieurbiz committed Jan 23, 2024
1 parent 12fb577 commit b2950a8
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/Resources/config/routes/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,29 @@ monsieurbiz_sylius_settings_admin_index:
path: settings
controller: MonsieurBiz\SyliusSettingsPlugin\Controller\SettingsController::indexAction
methods: ['GET']
defaults:
_sylius:
alias: monsieurbiz.settings_admin_index
section: admin
permission: true


monsieurbiz_sylius_settings_admin_edit:
path: settings/edit/{alias}
controller: MonsieurBiz\SyliusSettingsPlugin\Controller\SettingsController::formAction
methods: ['GET']
defaults:
_sylius:
alias: monsieurbiz.settings_admin_edit
section: admin
permission: true

monsieurbiz_sylius_settings_admin_edit_post:
path: settings/edit/{alias}
controller: MonsieurBiz\SyliusSettingsPlugin\Controller\SettingsController::formAction
methods: ['PUT']
defaults:
_sylius:
alias: monsieurbiz.settings_admin_edit_post
section: admin
permission: true
10 changes: 10 additions & 0 deletions src/Resources/translations/messages.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@ monsieurbiz:
title:
sylius_default_values: Sylius' default values
channel_default_values: Default values for %channelName%
sylius_plus:
rbac:
parent:
monsieurbiz:
settings_admin_edit_posts: 'Save settings'
settings_admin_edits: 'Edit settings'
settings_admin_indices: 'Settings list'
monsieurbiz_sylius_settings_admin_edit_post: 'Save'
monsieurbiz_sylius_settings_admin_edit: 'Update'
monsieurbiz_sylius_settings_admin_index: 'Index'
10 changes: 10 additions & 0 deletions src/Resources/translations/messages.fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,13 @@ monsieurbiz:
title:
sylius_default_values: Valeurs par défaut de Sylius
channel_default_values: Valeurs par défaut de %channelName%
sylius_plus:
rbac:
parent:
monsieurbiz:
settings_admin_edit_posts: 'Sauvegarde réglages'
settings_admin_edits: 'Éditer réglages'
settings_admin_indices: 'Lister réglages'
monsieurbiz_sylius_settings_admin_edit_post: 'Sauvegarde'
monsieurbiz_sylius_settings_admin_edit: 'Update'
monsieurbiz_sylius_settings_admin_index: 'Index'

0 comments on commit b2950a8

Please sign in to comment.