Guest User

Untitled

a guest
Feb 20th, 2018
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.17 KB | None | 0 0
  1. #Excecute this script using clean db and try to login with the diffrent users.
  2. #FYI: this script will delete the "Editor" Role
  3. -
  4. type: content
  5. mode: create
  6. content_type: folder
  7. parent_location: 2
  8. attributes:
  9. name: Folder A
  10. references:
  11. -
  12. identifier: folder_a_location
  13. attribute: location_id
  14. -
  15. identifier: folder_a_path
  16. attribute: path
  17. -
  18. type: content
  19. mode: create
  20. content_type: folder
  21. parent_location: reference:folder_a_location
  22. attributes:
  23. name: Level A1
  24. references:
  25. -
  26. identifier: folder_a_1_location
  27. attribute: location_id
  28. -
  29. type: content
  30. mode: create
  31. content_type: folder
  32. parent_location: reference:folder_a_1_location
  33. attributes:
  34. name: Level A2
  35. references:
  36. -
  37. identifier: folder_a_2_location
  38. attribute: location_id
  39. -
  40. type: content
  41. mode: create
  42. content_type: folder
  43. parent_location: reference:folder_a_2_location
  44. attributes:
  45. name: Level A3
  46. references:
  47. -
  48. identifier: folder_a_3_location
  49. attribute: location_id
  50. -
  51. type: content
  52. mode: create
  53. content_type: folder
  54. parent_location: 2
  55. attributes:
  56. name: Folder B
  57. references:
  58. -
  59. identifier: folder_b_location
  60. attribute: location_id
  61. -
  62. identifier: folder_b_path
  63. attribute: path
  64. -
  65. type: content
  66. mode: create
  67. content_type: folder
  68. parent_location: reference:folder_b_location
  69. attributes:
  70. name: Level B1
  71. references:
  72. -
  73. identifier: folder_b_1_location
  74. attribute: location_id
  75. -
  76. type: content
  77. mode: create
  78. content_type: folder
  79. parent_location: reference:folder_b_1_location
  80. attributes:
  81. name: Level B2
  82. references:
  83. -
  84. identifier: folder_b_2_location
  85. attribute: location_id
  86. -
  87. type: content
  88. mode: create
  89. content_type: folder
  90. parent_location: reference:folder_b_2_location
  91. attributes:
  92. name: Level B3
  93. references:
  94. -
  95. identifier: folder_b_3_location
  96. attribute: location_id
  97. -
  98. type: user_group
  99. mode: create
  100. parent_group_id: 13
  101. name: Folder A
  102. references:
  103. -
  104. identifier: editors_folder_a_id
  105. attribute: user_group_id
  106. -
  107. type: user_group
  108. mode: create
  109. parent_group_id: 13
  110. name: Folder B
  111. references:
  112. -
  113. identifier: editors_folder_b_id
  114. attribute: user_group_id
  115. -
  116. type: user_group
  117. mode: create
  118. parent_group_id: 13
  119. name: Master
  120. references:
  121. -
  122. identifier: editors_master_id
  123. attribute: user_group_id
  124. -
  125. type: user
  126. mode: create
  127. first_name: Jane
  128. last_name: Doe
  129. username: janedoe
  130. email: jane.doe@me.com
  131. password: publish
  132. groups: [reference:editors_folder_a_id]
  133. -
  134. type: user
  135. mode: create
  136. first_name: John
  137. last_name: Doe
  138. username: johndoe
  139. email: john.doe@me.com
  140. password: publish
  141. groups: [reference:editors_folder_b_id]
  142. -
  143. type: user
  144. mode: create
  145. first_name: Don
  146. last_name: Doe
  147. username: dondoe
  148. email: don.doe@me.com
  149. password: publish
  150. groups: [reference:editors_master_id]
  151. -
  152. type: role
  153. mode: delete
  154. match:
  155. identifier: Editor
  156. -
  157. type: role
  158. mode: create
  159. name: Editor Master
  160. policies:
  161. -
  162. module: content
  163. function: '*'
  164. -
  165. module: user
  166. function: login
  167. assign:
  168. -
  169. type: group
  170. ids: [ reference:editors_master_id ]
  171. limitations:
  172. -
  173. identifier: Subtree
  174. values: [ /1/2/, /1/43/ ]
  175. -
  176. type: role
  177. mode: create
  178. name: Editor Folder A
  179. policies:
  180. -
  181. module: content
  182. function: '*'
  183. -
  184. module: user
  185. function: login
  186. assign:
  187. -
  188. type: group
  189. ids: [ reference:editors_folder_a_id ]
  190. limitations:
  191. -
  192. identifier: Subtree
  193. values: [ reference:folder_a_path, /1/43/ ]
  194. -
  195. type: role
  196. mode: create
  197. name: Editor Folder B
  198. policies:
  199. -
  200. module: content
  201. function: '*'
  202. -
  203. module: user
  204. function: login
  205. assign:
  206. -
  207. type: group
  208. ids: [ reference:editors_folder_b_id ]
  209. limitations:
  210. -
  211. identifier: Subtree
  212. values: [ reference:folder_b_path, /1/43/ ]
  213. -
  214. type: role
  215. mode: create
  216. name: Editor Read Root
  217. policies:
  218. -
  219. module: content
  220. function: read
  221. limitations:
  222. -
  223. identifier: Node
  224. values: [ 2 ]
  225. assign:
  226. -
  227. type: group
  228. ids: [ reference:editors_folder_a_id, reference:editors_folder_b_id ]
Add Comment
Please, Sign In to add comment