Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Excecute this script using clean db and try to login with the diffrent users.
- #FYI: this script will delete the "Editor" Role
- -
- type: content
- mode: create
- content_type: folder
- parent_location: 2
- attributes:
- name: Folder A
- references:
- -
- identifier: folder_a_location
- attribute: location_id
- -
- identifier: folder_a_path
- attribute: path
- -
- type: content
- mode: create
- content_type: folder
- parent_location: reference:folder_a_location
- attributes:
- name: Level A1
- references:
- -
- identifier: folder_a_1_location
- attribute: location_id
- -
- type: content
- mode: create
- content_type: folder
- parent_location: reference:folder_a_1_location
- attributes:
- name: Level A2
- references:
- -
- identifier: folder_a_2_location
- attribute: location_id
- -
- type: content
- mode: create
- content_type: folder
- parent_location: reference:folder_a_2_location
- attributes:
- name: Level A3
- references:
- -
- identifier: folder_a_3_location
- attribute: location_id
- -
- type: content
- mode: create
- content_type: folder
- parent_location: 2
- attributes:
- name: Folder B
- references:
- -
- identifier: folder_b_location
- attribute: location_id
- -
- identifier: folder_b_path
- attribute: path
- -
- type: content
- mode: create
- content_type: folder
- parent_location: reference:folder_b_location
- attributes:
- name: Level B1
- references:
- -
- identifier: folder_b_1_location
- attribute: location_id
- -
- type: content
- mode: create
- content_type: folder
- parent_location: reference:folder_b_1_location
- attributes:
- name: Level B2
- references:
- -
- identifier: folder_b_2_location
- attribute: location_id
- -
- type: content
- mode: create
- content_type: folder
- parent_location: reference:folder_b_2_location
- attributes:
- name: Level B3
- references:
- -
- identifier: folder_b_3_location
- attribute: location_id
- -
- type: user_group
- mode: create
- parent_group_id: 13
- name: Folder A
- references:
- -
- identifier: editors_folder_a_id
- attribute: user_group_id
- -
- type: user_group
- mode: create
- parent_group_id: 13
- name: Folder B
- references:
- -
- identifier: editors_folder_b_id
- attribute: user_group_id
- -
- type: user_group
- mode: create
- parent_group_id: 13
- name: Master
- references:
- -
- identifier: editors_master_id
- attribute: user_group_id
- -
- type: user
- mode: create
- first_name: Jane
- last_name: Doe
- username: janedoe
- email: jane.doe@me.com
- password: publish
- groups: [reference:editors_folder_a_id]
- -
- type: user
- mode: create
- first_name: John
- last_name: Doe
- username: johndoe
- email: john.doe@me.com
- password: publish
- groups: [reference:editors_folder_b_id]
- -
- type: user
- mode: create
- first_name: Don
- last_name: Doe
- username: dondoe
- email: don.doe@me.com
- password: publish
- groups: [reference:editors_master_id]
- -
- type: role
- mode: delete
- match:
- identifier: Editor
- -
- type: role
- mode: create
- name: Editor Master
- policies:
- -
- module: content
- function: '*'
- -
- module: user
- function: login
- assign:
- -
- type: group
- ids: [ reference:editors_master_id ]
- limitations:
- -
- identifier: Subtree
- values: [ /1/2/, /1/43/ ]
- -
- type: role
- mode: create
- name: Editor Folder A
- policies:
- -
- module: content
- function: '*'
- -
- module: user
- function: login
- assign:
- -
- type: group
- ids: [ reference:editors_folder_a_id ]
- limitations:
- -
- identifier: Subtree
- values: [ reference:folder_a_path, /1/43/ ]
- -
- type: role
- mode: create
- name: Editor Folder B
- policies:
- -
- module: content
- function: '*'
- -
- module: user
- function: login
- assign:
- -
- type: group
- ids: [ reference:editors_folder_b_id ]
- limitations:
- -
- identifier: Subtree
- values: [ reference:folder_b_path, /1/43/ ]
- -
- type: role
- mode: create
- name: Editor Read Root
- policies:
- -
- module: content
- function: read
- limitations:
- -
- identifier: Node
- values: [ 2 ]
- assign:
- -
- type: group
- ids: [ reference:editors_folder_a_id, reference:editors_folder_b_id ]
Add Comment
Please, Sign In to add comment