there is no obvious way to redefine a relation definition permission using get_relation is forbidden with a "can't use get_relation for relation with multiple definitions" using:
class my_createde_by(RelationDefinition):
name = 'created_by'
subject = 'Case'
object = 'CWUser'
__permissions__ = {'read': ('users', 'managers'),
'add': ('users', 'managers'),
'delete': ('users', 'managers')}
is forbidden with a yams._exceptions.BadSchemaDefinition: conflicting values {'read': ('users', 'managers'), 'add': ('users', 'managers'), 'delete': ('users', 'managers')}/{'read': ('managers', 'users', 'guests'), 'add': ('managers',), 'delete': ('managers',)} for property __permissions__ of relation 'created_by' | |
| priority | normal |
|---|---|
| type | bug |
| appeared in | <not specified> |
| done in | <not specified> |
| load | 0.000 |
| load left | 0.000 |
| closed by | <not specified> |


#1436273 cubicweb-ctl newcube improvements
Comments
or do we settle on the post_build_callback solution ?
at least this should go in the doc
Let's add documentation about post_build_callback + example on how to solve the pb below with it.