Modify ↓
#10941 closed defect (fixed)
Change permission action definition for intuitive inheritance
Reported by: | Steffen Hoffmann | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | VotePlugin |
Severity: | normal | Keywords: | permission |
Cc: | Trac Release: |
Description
From description:
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:
-
a/tracvote/__init__.py
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?
Attachments (0)
Change History (6)
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Owner: | changed from Ryan J Ollos to Steffen Hoffmann |
---|
comment:3 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 Changed 12 years ago by
(In [12775]) VotePlugin: Add an unit test harness, refs #10941.
Including more author comments and explicit license file for clarity.
comment:6 Changed 12 years ago by
Note: See
TracTickets for help on using
tickets.
Yes, make sense. Thanks for catching that. Please feel free to commit.
Wiring up the unit tests has been on my TODO list for this plugin. For this change though, I don't imagine that a unit test is needed. A functional test would be nice, but better to get the fix in there and we'll add the functional test infrastructure when time allows.