Edgewall Software

Ticket #5444 (closed defect: duplicate)

Opened 18 months ago

Last modified 15 months ago

Setting a duplicate permission fails with error

Reported by: anonymous Owned by: cmlenz
Priority: normal Milestone:
Component: admin/web Version: 0.10-stable
Severity: normal Keywords:
Cc: sarahg@…

Description (last modified by athomas) (diff)

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

Change History

Changed 18 months ago by athomas

  • description modified (diff)

Changed 15 months ago by sarahg@…

  • 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.

Changed 15 months ago by cboos

  • status changed from new to closed
  • resolution set to duplicate

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).

Add/Change #5444 (Setting a duplicate permission fails with error)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cmlenz. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.