Closed
Bug 745173
Opened 13 years ago
Closed 13 years ago
balrog's requirepermission decorator passes wrong thing to hasUrlPermission
Categories
(Release Engineering :: General, defect)
Release Engineering
General
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bhearsum, Assigned: bhearsum)
References
Details
Attachments
(1 file)
(deleted),
patch
|
rail
:
review+
bhearsum
:
checked-in+
|
Details | Diff | Splinter Review |
hasUrlPermission matches against a permission name, which is a templatized version of a real URL. requirepermission currently passes a non-templatized, real URL to hasUrlPermission. Because of this, permission matching doesn't work at all, except for 'admin' users.
Assignee | ||
Comment 1•13 years ago
|
||
Alright, this is the simplest way to solve this: require each view to pass its granular permission to requirpermission, rather than using the real one out of the request. I also added a couple of tests.
Another way to do this would be pass the real URL to hasUrlPermission, and have it iterate over all possible permissions and match against them. This seemed pretty painful and more expensive, though.
Attachment #614763 -
Flags: review?(rail)
Updated•13 years ago
|
Attachment #614763 -
Flags: review?(rail) → review+
Assignee | ||
Comment 2•13 years ago
|
||
Comment on attachment 614763 [details] [diff] [review]
fix granular permission checking
jenkins run is here: https://jenkins.mozilla.org/job/Balrog/72/
Attachment #614763 -
Flags: checked-in+
Assignee | ||
Comment 3•13 years ago
|
||
This worked.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•11 years ago
|
Product: mozilla.org → Release Engineering
Updated•7 years ago
|
Component: General Automation → General
You need to log in
before you can comment on or make changes to this bug.
Description
•