File tree Expand file tree Collapse file tree 1 file changed +45
-1
lines changed Expand file tree Collapse file tree 1 file changed +45
-1
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,51 @@ fields:
6161` ` ` php
6262return [
6363 'sylvainjule.bouncer.list' => [
64- 'test' => 'canaccess'
64+ 'test' => [
65+ 'fieldname' => 'canaccess'
66+ ]
67+ ]
68+ ];
69+ ` ` `
70+
71+ # ## 2.1 Optional page switcher
72+
73+ (beta)
74+
75+ Since 1.0.1 a given user can access different pages. You can remove the `multiple : false` option from the blueprint:
76+
77+ ` ` ` yaml
78+ # User role blueprint
79+ title: Test
80+
81+ fields:
82+ canaccess:
83+ label: 'The user will only be able to access:'
84+ type: pages
85+ options: query
86+ query: site.pages # or any query that suits your needs
87+ ` ` `
88+
89+ Add a `bouncernav` section in every page you'd like to display the language switcher on :
90+
91+ ` ` ` php
92+ // Anywhere in any blueprint
93+
94+ (...)
95+ sections:
96+ bouncernav:
97+ type: bouncernav
98+ ` ` `
99+
100+ Then state in your `config.php` that you want to display the page switcher for a given user role :
101+
102+ ` ` ` php
103+ return [
104+ 'sylvainjule.bouncer.list' => [
105+ 'test' => [
106+ 'fieldname' => 'canaccess',
107+ 'nav' => true
108+ ]
65109 ]
66110];
67111` ` `
You can’t perform that action at this time.
0 commit comments