17 - ``authenticated``, only authenticated users can see it |
17 - ``authenticated``, only authenticated users can see it |
18 - ``restricted``, only a subset of authenticated users can see it |
18 - ``restricted``, only a subset of authenticated users can see it |
19 |
19 |
20 * managers (e.g. me) can see everything |
20 * managers (e.g. me) can see everything |
21 * only authenticated users can see people |
21 * only authenticated users can see people |
22 * everyone can see classifier entities, such as tag and zone |
22 * everyone can see classifier entities, such as tag |
23 |
23 |
24 Also: |
24 Also: |
25 |
25 |
26 * unless explicitly specified, the visibility of an image should be the same as |
26 * unless explicitly specified, the visibility of an image should be the same as |
27 its parent folder |
27 its parent folder |
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 |
144 from cubicweb_zone.schema import Zone |
|
145 from cubicweb_tag.schema import Tag |
144 from cubicweb_tag.schema import Tag |
146 |
145 |
147 Folder.__permissions__ = VISIBILITY_PERMISSIONS |
146 Folder.__permissions__ = VISIBILITY_PERMISSIONS |
148 File.__permissions__ = VISIBILITY_PERMISSIONS |
147 File.__permissions__ = VISIBILITY_PERMISSIONS |
149 Comment.__permissions__ = VISIBILITY_PERMISSIONS.copy() |
148 Comment.__permissions__ = VISIBILITY_PERMISSIONS.copy() |
150 Comment.__permissions__['add'] = ('managers', 'users',) |
149 Comment.__permissions__['add'] = ('managers', 'users',) |
151 Person.__permissions__ = AUTH_ONLY_PERMISSIONS |
150 Person.__permissions__ = AUTH_ONLY_PERMISSIONS |
152 Zone.__permissions__ = CLASSIFIERS_PERMISSIONS |
|
153 Tag.__permissions__ = CLASSIFIERS_PERMISSIONS |
151 Tag.__permissions__ = CLASSIFIERS_PERMISSIONS |
154 |
152 |
155 What's important in there: |
153 What's important in there: |
156 |
154 |
157 * `VISIBILITY_PERMISSIONS` provides read access to managers group, if |
155 * `VISIBILITY_PERMISSIONS` provides read access to managers group, if |