Edgewall Software

Ticket #3873 (closed defect: fixed)

Opened 2 years ago

Last modified 19 months ago

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:

Description (last modified by cboos) (diff)

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

warn_permission_exists-r5190.diff (3.1 KB) - added by cboos 20 months ago.
Display general warnings, and application to the problem discussed in this ticket.

Change History

Changed 2 years ago by cboos

  • severity changed from normal to minor
  • description modified (diff)
  • milestone set to 0.10.1

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

Changed 2 years ago by cmlenz

  • owner changed from jonas to cmlenz
  • component changed from general to webadmin
  • milestone changed from 0.10.1 to 0.11

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

Changed 2 years ago by cmlenz

  • version changed from 0.10 to devel

Changed 20 months 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.

Changed 20 months ago by cboos

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

Changed 20 months ago by cboos

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

Changed 20 months ago by cboos

  • keywords review added

Changed 19 months ago by cboos

  • keywords review removed
  • status changed from assigned to closed
  • resolution set to fixed
  • summary changed from Trac Internal Error to Internal Error when adding permission already granted

Fixed in r5226 (see also r5228).

Add/Change #3873 (Internal Error when adding permission already granted)

Author



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