Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#5616 closed defect (duplicate)

get_users_with_permission(s) returning wrong results

Reported by: greg@… 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.

Attachments (0)

Change History (1)

comment:1 by Emmanuel Blot, 17 years ago

Resolution: duplicate
Status: newclosed

Probable duplicate of #4630.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.