Edgewall Software
Modify

Opened 17 years ago

Closed 17 years ago

#5444 closed defect (duplicate)

Setting a duplicate permission fails with error

Reported by: anonymous Owned by: Christopher Lenz
Priority: normal Milestone:
Component: admin/web Version: 0.10-stable
Severity: normal Keywords:
Cc: sarahg@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Alec Thomas)

Traceback (most recent call last):
  File "C:\Program Files\ActiveState\Python\Lib\site-packages\trac\web\main.py", line 387, in dispatch_request
    dispatcher.dispatch(req)
  File "C:\Program Files\ActiveState\Python\Lib\site-packages\trac\web\main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "c:\program files\activestate\python\lib\site-packages\TracWebAdmin-0.1.2dev_r4240-py2.4.egg\webadmin\web_ui.py", line 109, in process_request
    path_info)
  File "c:\program files\activestate\python\lib\site-packages\TracWebAdmin-0.1.2dev_r4240-py2.4.egg\webadmin\perm.py", line 45, in process_admin_request
    perm.grant_permission(subject, action)
  File "C:\Program Files\ActiveState\Python\Lib\site-packages\trac\perm.py", line 190, in grant_permission
    self.store.grant_permission(username, action)
  File "C:\Program Files\ActiveState\Python\Lib\site-packages\trac\perm.py", line 143, in grant_permission
    (username, action))
  File "C:\Program Files\ActiveState\Python\Lib\site-packages\trac\db\util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "C:\Program Files\ActiveState\Python\Lib\site-packages\trac\db\sqlite_backend.py", line 56, in execute
    args or [])
  File "C:\Program Files\ActiveState\Python\Lib\site-packages\trac\db\sqlite_backend.py", line 48, in _rollback_on_error
    return function(self, *args, **kwargs)
IntegrityError: columns username, action are not unique

Attachments (0)

Change History (3)

comment:1 by Alec Thomas, 17 years ago

Description: modified (diff)

comment:2 by sarahg@…, 17 years ago

Cc: sarahg@… added

I'm ok with the error condition but it'd be great if it was less cryptic, eg "user already has permission" or some such.

comment:3 by Christian Boos, 17 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #3873. Fixed in trunk and can't easily be backported to 0.10-stable (and not that critical to go in 0.10-stable now anyway).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz 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.