equal
deleted
inserted
replaced
309 object = 'CWEType' |
309 object = 'CWEType' |
310 |
310 |
311 def post_build_callback(schema): |
311 def post_build_callback(schema): |
312 """set attributes permissions for schema/workflow entities""" |
312 """set attributes permissions for schema/workflow entities""" |
313 from cubicweb.schema import SCHEMA_TYPES, WORKFLOW_TYPES, META_RTYPES |
313 from cubicweb.schema import SCHEMA_TYPES, WORKFLOW_TYPES, META_RTYPES |
|
314 wftypes = WORKFLOW_TYPES - set(('TrInfo',)) |
314 for eschema in schema.entities(): |
315 for eschema in schema.entities(): |
315 if eschema in SCHEMA_TYPES or eschema in WORKFLOW_TYPES: |
316 if eschema in SCHEMA_TYPES or eschema in wftypes: |
316 for rschema in eschema.subject_relations(): |
317 for rschema in eschema.subject_relations(): |
317 if rschema.final and not rschema in META_RTYPES: |
318 if rschema.final and not rschema in META_RTYPES: |
318 rdef = eschema.rdef(rschema) |
319 rdef = eschema.rdef(rschema) |
319 rdef.permissions = PUB_SYSTEM_ATTR_PERMS |
320 rdef.permissions = PUB_SYSTEM_ATTR_PERMS |