# HG changeset patch # User Sylvain Thénault # Date 1253173899 -7200 # Node ID 4fdb165ae3de77a42accec6073cfdbaf80736aa5 # Parent 4480887772a3d4e30f9edb2b2141e87eeb5cc819 fix see_also permissions diff -r 4480887772a3 -r 4fdb165ae3de misc/migration/3.5.0_Any.py --- a/misc/migration/3.5.0_Any.py Thu Sep 17 09:49:13 2009 +0200 +++ b/misc/migration/3.5.0_Any.py Thu Sep 17 09:51:39 2009 +0200 @@ -5,3 +5,6 @@ drop_attribute('EmailAddress', 'canonical') drop_relation_definition('EmailAddress', 'identical_to', 'EmailAddress') + +if 'see_also' in schema: + sync_schema_props_perms('see_also', syncprops=False, syncrdefs=False) diff -r 4480887772a3 -r 4fdb165ae3de schemas/base.py --- a/schemas/base.py Thu Sep 17 09:49:13 2009 +0200 +++ b/schemas/base.py Thu Sep 17 09:51:39 2009 +0200 @@ -269,3 +269,8 @@ class see_also(RelationType): """generic relation to link one entity to another""" symetric = True + permissions = { + 'read': ('managers', 'users', 'guests',), + 'add': ('managers', RRQLExpression('U has_update_permission S'),), + 'delete': ('managers', RRQLExpression('U has_update_permission S'),), + }