Opened 18 years ago
Closed 17 years ago
#5616 closed defect (duplicate)
get_users_with_permission(s) returning wrong results
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | ticket system | Version: | devel |
Severity: | major | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I'm using the mysql backend and the accountmanager plugin on [5697].
My "reassign to" dropdown is not being correctly populated with usernames; I've instrumented the function get_users_with_permission(s) to output to the debug log and:
2007-06-27 23:15:26,690 Trac[perm] DEBUG: get_users_with_permissions(['TICKET_MODIFY', 'TICKET_ADMIN', 'TRAC_ADMIN'])=Set([u'user1', u'user2', u'user3']) 2007-06-27 23:15:26,691 Trac[perm] DEBUG: get_users_with_permission(TICKET_MODIFY)=[u'user1', u'user2', u'user3']
User1, user2, and user3 all have TRAC_ADMIN privileges, but there are many more authenticated users with TICKET_MODIFY privs:
mysql> select * from permission where action='TICKET_MODIFY'; +---------------+---------------+ | username | action | +---------------+---------------+ | authenticated | TICKET_MODIFY | +---------------+---------------+ mysql> select count(*) from session where authenticated=1; +----------+ | count(*) | +----------+ | 14 | +----------+ 1 row in set (0.00 sec)
I think some caching layer is probably to blame.
Probable duplicate of #4630.