Modify ↓
Opened 9 years ago
Closed 9 years ago
#12734 closed enhancement (fixed)
Log invalid actions used in AuthzPolicy
| Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2.1 |
| Component: | general | Version: | |
| Severity: | normal | Keywords: | authzpolicy |
| Cc: | Branch: | ||
| Release Notes: |
Invalid actions in authz file are logged at warning level. |
||
| API Changes: | |||
| Internal Changes: | |||
Description (last modified by )
To help with debugging, it would be useful to log a warning when an undefined action is used in AuthzPolicy.
Attachments (0)
Change History (7)
comment:1 by , 9 years ago
| Description: | modified (diff) |
|---|
comment:2 by , 9 years ago
| Milestone: | next-stable-1.2.x → 1.2.1 |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:3 by , 9 years ago
| Release Notes: | modified (diff) |
|---|---|
| Resolution: | → fixed |
| Status: | assigned → closed |
comment:4 by , 9 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
TracFineGrainedPermissions#UsageNotes
[groups] admins = john, jack devs = alice, bob
Now this warns: "The action john in the [groups] section of authzpolicy.conf is not a valid action."
comment:5 by , 9 years ago
| Status: | reopened → assigned |
|---|
comment:6 by , 9 years ago
I think that section could just be skipped there:
-
tracopt/perm/authz_policy.py
diff -r f61b53b84d91 tracopt/perm/authz_policy.py
a b 206 206 207 207 all_actions = PermissionSystem(self.env).get_actions() 208 208 for section in self.authz.sections(): 209 if section == 'groups': 210 continue 209 211 for _, actions in self.authz.items(section): 210 212 for action in to_list(actions): 211 213 if action not in all_actions:
It's also skipped later.
comment:7 by , 9 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.



Proposed change in [65ad7217/rjollos.git]. The change without test will be targeted to 1.2-stable, where
EnvironmentStub.log_messagesis not available.