115 .. sourcecode:: python |
115 .. sourcecode:: python |
116 |
116 |
117 from cubicweb.schema import ERQLExpression |
117 from cubicweb.schema import ERQLExpression |
118 |
118 |
119 VISIBILITY_PERMISSIONS = { |
119 VISIBILITY_PERMISSIONS = { |
120 'read': ('managers', |
120 'read': ('managers', |
121 ERQLExpression('X visibility "public"'), |
121 ERQLExpression('X visibility "public"'), |
122 ERQLExpression('X may_be_read_by U')), |
122 ERQLExpression('X may_be_read_by U')), |
123 'add': ('managers',), |
123 'add': ('managers',), |
124 'update': ('managers', 'owners',), |
124 'update': ('managers', 'owners',), |
125 'delete': ('managers', 'owners'), |
125 'delete': ('managers', 'owners'), |
126 } |
126 } |
127 AUTH_ONLY_PERMISSIONS = { |
127 AUTH_ONLY_PERMISSIONS = { |
128 'read': ('managers', 'users'), |
128 'read': ('managers', 'users'), |
129 'add': ('managers',), |
129 'add': ('managers',), |
130 'update': ('managers', 'owners',), |
130 'update': ('managers', 'owners',), |
131 'delete': ('managers', 'owners'), |
131 'delete': ('managers', 'owners'), |
132 } |
132 } |
133 CLASSIFIERS_PERMISSIONS = { |
133 CLASSIFIERS_PERMISSIONS = { |
134 'read': ('managers', 'users', 'guests'), |
134 'read': ('managers', 'users', 'guests'), |
135 'add': ('managers',), |
135 'add': ('managers',), |
136 'update': ('managers', 'owners',), |
136 'update': ('managers', 'owners',), |
137 'delete': ('managers', 'owners'), |
137 'delete': ('managers', 'owners'), |
138 } |
138 } |
139 |
139 |
140 from cubicweb_folder.schema import Folder |
140 from cubicweb_folder.schema import Folder |
141 from cubicweb_file.schema import File |
141 from cubicweb_file.schema import File |
142 from cubicweb_comment.schema import Comment |
142 from cubicweb_comment.schema import Comment |
143 from cubicweb_person.schema import Person |
143 from cubicweb_person.schema import Person |