168 # configurable security |
168 # configurable security |
169 class require_permission(RelationType): |
169 class require_permission(RelationType): |
170 """link a permission to the entity. This permission should be used in the |
170 """link a permission to the entity. This permission should be used in the |
171 security definition of the entity's type to be useful. |
171 security definition of the entity's type to be useful. |
172 """ |
172 """ |
173 __permissions__ = { |
173 __permissions__ = META_RTYPE_PERMS |
174 'read': ('managers', 'users', 'guests'), |
|
175 'add': ('managers',), |
|
176 'delete': ('managers',), |
|
177 } |
|
178 |
174 |
179 class require_group(RelationType): |
175 class require_group(RelationType): |
180 """used to grant a permission to a group""" |
176 """used to grant a permission to a group""" |
181 __permissions__ = { |
177 __permissions__ = META_RTYPE_PERMS |
182 'read': ('managers', 'users', 'guests'), |
|
183 'add': ('managers',), |
|
184 'delete': ('managers',), |
|
185 } |
|
186 |
178 |
187 |
179 |
188 class ExternalUri(EntityType): |
180 class ExternalUri(EntityType): |
189 """a URI representing an object in external data store""" |
181 """a URI representing an object in external data store""" |
190 uri = String(required=True, unique=True, maxsize=256, |
182 uri = String(required=True, unique=True, maxsize=256, |