#13940 closed defect (fixed)
[Patch] $USER substitutions don't works in matching_condition
| Reported by: | Andrew G. Khodotov | Owned by: | Cauly |
|---|---|---|---|
| Priority: | normal | Component: | TracConfigurablePermissionPlugin |
| Severity: | normal | Keywords: | patch |
| Cc: | Trac Release: | 1.2 |
Description (last modified by )
Substitution $USER not replaced with real user name.
See attached patch to solve this problem.
Attachments (1)
Change History (6)
Changed 5 years ago by
| Attachment: | configurable_permission_$USER.patch added |
|---|
comment:1 Changed 5 years ago by
| Description: | modified (diff) |
|---|
comment:2 follow-up: 3 Changed 5 years ago by
comment:3 follow-up: 4 Changed 5 years ago by
Replying to Cauly:
I think the example 3 in wiki is wrong, however is
owner_edit_only = ticket, TICKET_EDIT, owner=$USER, *, allow-onlyworking as expected?
No, of course. I wrote remark about this in wiki.
By the way, what's the meaning of
authname=username?
The plugin uses Query from trac.ticket.query to check the ticket for matching_condition. Declaration of execute function is
execute(self, req=None, cached_ids=None, authname=None, tzinfo=None, href=None, locale=None)
Function count which I use in my patch has some declaration.
So, I transmit into query username which is testing for permission.
comment:4 Changed 5 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
You are right, query needs authname to perfrom $USER substitution. I have applied your patch and updated the wiki. Thank you very much!
comment:5 Changed 5 years ago by
Thank YOU for plugin! Simple implementation, ample opportunities - it's great!



I think the example 3 in wiki is wrong, however is
owner_edit_only = ticket, TICKET_EDIT, owner=$USER, *, allow-onlyworking as expected?By the way, what's the meaning of
authname=username?