Edgewall Software
Modify

Opened 10 years ago

Closed 10 years ago

#3873 closed defect (fixed)

Internal Error when adding permission already granted

Reported by: tom.fiala@… Owned by: Christian Boos
Priority: normal Milestone: 0.11
Component: admin/web Version: devel
Severity: minor Keywords:
Cc:
Release Notes:
API Changes:

Description (last modified by Christian Boos)

I received an internal error when trying to assign an already assigned admin permission to a subject. I would have expected an error message informing me the permission was already assigned. Here is the trace log: Python Traceback

Traceback (most recent call last):
  File "/usr/local/python/lib/python2.4/site-packages/trac/web/main.py", line 339, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/python/lib/python2.4/site-packages/trac/web/main.py", line 224, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/python-2.4/lib/python2.4/site-packages/TracWebAdmin-0.1.1dev_r2765-py2.4.egg/webadmin/web_ui.py", line 106, in process_request
    path_info)
  File "/usr/local/python-2.4/lib/python2.4/site-packages/TracWebAdmin-0.1.1dev_r2765-py2.4.egg/webadmin/perm.py", line 45, in process_admin_request
    perm.grant_permission(subject, action)
  File "/usr/local/python/lib/python2.4/site-packages/trac/perm.py", line 190, in grant_permission
    self.store.grant_permission(username, action)
  File "/usr/local/python/lib/python2.4/site-packages/trac/perm.py", line 143, in grant_permission
    (username, action))
  File "/usr/local/python/lib/python2.4/site-packages/trac/db/util.py", line 47, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/local/python/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 44, in execute
    args or [])
  File "/usr/local/python/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 36, in _rollback_on_error
    return function(self, *args, **kwargs)
IntegrityError: columns username, action are not unique

Attachments (1)

warn_permission_exists-r5190.diff (3.1 KB) - added by Christian Boos 10 years ago.
Display general warnings, and application to the problem discussed in this ticket.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by Christian Boos

Description: modified (diff)
Milestone: 0.10.1
Severity: normalminor

Right, the error message could be more "friendly".

comment:2 Changed 10 years ago by Christopher Lenz

Component: generalwebadmin
Milestone: 0.10.10.11
Owner: changed from Jonas Borgström to Christopher Lenz

This is a WebAdmin ticket, so it can't really be targetted for 0.10.1.

comment:3 Changed 10 years ago by Christopher Lenz

Version: 0.10devel

comment:4 Changed 10 years ago by Christian Boos

Owner: changed from Christopher Lenz to Christian Boos
Status: newassigned

No need for an error I think. In the future, a warning would be enough.

comment:5 Changed 10 years ago by Christian Boos

The "internal error" issue is fixed in r5190, I'll look into adding a generic warning mechanism.

Changed 10 years ago by Christian Boos

Display general warnings, and application to the problem discussed in this ticket.

comment:6 Changed 10 years ago by Christian Boos

Keywords: review added

comment:7 Changed 10 years ago by Christian Boos

Keywords: review removed
Resolution: fixed
Status: assignedclosed
Summary: Trac Internal ErrorInternal Error when adding permission already granted

Fixed in r5226 (see also r5228).

Modify Ticket

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