Change permission action definition for intuitive inheritance
|Reported by:||hasienda||Owned by:||hasienda|
If a user has a valid session (created through the Preferences panel) and the VOTE_MODIFY permission, they will be able to vote.
This is not true, because he/she won't currently see the down-/up-vote links at all. Therefore more intuitive permission inheritance is suggested:
diff -u a/tracvote/__init__.py b/tracvote/__init__.py
117 117 118 118 # IPermissionRequestor method 119 119 def get_permission_actions(self): 120 return ['VOTE_VIEW', 'VOTE_MODIFY'] 120 action = 'VOTE_VIEW' 121 return [('VOTE_MODIFY', [action]), action] 121 122 122 123 ### ITemplateProvider methods 123 124
For what its worth, if you assign someone VOTE_MODIFY, it does actually rely on seeing the vote links, doesn't it?