Edgewall Software
Modify

Opened 8 years ago

Closed 8 years ago

#3873 closed defect (fixed)

Internal Error when adding permission already granted

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

Description (last modified by cboos)

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 cboos 8 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 8 years ago by cboos

  • Description modified (diff)
  • Milestone set to 0.10.1
  • Severity changed from normal to minor

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

comment:2 Changed 8 years ago by cmlenz

  • Component changed from general to webadmin
  • Milestone changed from 0.10.1 to 0.11
  • Owner changed from jonas to cmlenz

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

comment:3 Changed 8 years ago by cmlenz

  • Version changed from 0.10 to devel

comment:4 Changed 8 years ago by cboos

  • Owner changed from cmlenz to cboos
  • Status changed from new to assigned

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

comment:5 Changed 8 years ago by cboos

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

Changed 8 years ago by cboos

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

comment:6 Changed 8 years ago by cboos

  • Keywords review added

comment:7 Changed 8 years ago by cboos

  • Keywords review removed
  • Resolution set to fixed
  • Status changed from assigned to closed
  • Summary changed from Trac Internal Error to Internal 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 cboos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from cboos 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.