Opened 10 years ago
Closed 10 years ago
#11707 closed enhancement (fixed)
Module and other classes should have a realm attribute
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.1.3 |
Component: | general | Version: | |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: |
The |
||
Internal Changes: |
Description
This is a follow-on to #11609 in which the realm
attribute was added to Model objects. I propose to add a realm attribute to other classes, including those implementing IRequestHandler
(i.e. the "Module" classes), with the realm being assigned from the class attribute defined in the class implementing IResourceManager
.
This should help avoid regressions like the one mentioned in comment:12:ticket:11697.
Attachments (0)
Change History (6)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
I think you're right that 'query' can't be considered to be a realm. However, what if one wants to restrict access to the query module? In this case, it could be handled as an "action" on the 'ticket' realm ('query' in perm('ticket')
in idealized Trac API ;-) ).
comment:3 by , 10 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:4 by , 10 years ago
Release Notes: | modified (diff) |
---|
Proposed changes in log:rjollos.git:t11707.1.
comment:5 by , 10 years ago
comment:6 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed to trunk in [13405].
This gets a bit confusing, because while
query
is not a realm on which permission checks are done, it is passed as an argument toweb_context
for the resource or realm parameter:The basic idea I had for the changes here can be found in log:rjollos.git:t11707, but more investigation needs to be done. Fix for regression in [13055#file1] included in [a6a1b8a0/rjollos.git#file2], but I'll push a fix to the trunk now.