Modify

Opened 6 years ago

Closed 4 years ago

#3343 closed defect (fixed)

[patch] Error onClick "Remove selected accounts" when no account is selected

Reported by: Eli Iser Owned by: hasienda
Priority: normal Component: AccountManagerPlugin
Severity: minor Keywords: user admin
Cc: pacopablo Trac Release: 0.11

Description

Clicking "Remove selected accounts" when no account is selected leads to an error.

Attachments (1)

20100926_acct_mgr-fix_3343.patch (852 bytes) - added by hasienda 4 years ago.
simple check for empty argument

Download all attachments as: .zip

Change History (5)

comment:1 Changed 4 years ago by hasienda

  • Cc pacopablo added; anonymous removed
  • Keywords user admin added
  • Summary changed from "Remove selected accounts" when no account is selected to [patch] Error onClick "Remove selected accounts" when no account is selected

Confirmed, this is still true for trunk version with Trac 0.12.

It throws an AttributeError: 'NoneType' object has no attribute 'lower'

File "build/bdist.linux-i686/egg/trac/web/main.py", line 513, in _dispatch_request
  dispatcher.dispatch(req)
File "build/bdist.linux-i686/egg/trac/web/main.py", line 235, in dispatch
  resp = chosen_handler.process_request(req)
File "build/bdist.linux-i686/egg/trac/admin/web_ui.py", line 116, in process_request
  path_info)
File "build/bdist.linux-i686/egg/acct_mgr/admin.py", line 117, in render_admin_panel
  return self._do_users(req)
File "build/bdist.linux-i686/egg/acct_mgr/admin.py", line 201, in _do_users
  self.account_manager.delete_user(account)
File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 190, in delete_user
  store = self.find_user_store(user)
File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 259, in find_user_store
  user = ignore_auth_case and user.lower() or user

A simple check for empty argument list inside the delete handler should be sufficient. See the patch, that I'll attach in a minute.

Changed 4 years ago by hasienda

simple check for empty argument

comment:2 follow-up: Changed 4 years ago by hasienda

Patch has been applied to current trunk version and successfully tested with Trac 0.12 right now. A click without selection does just nothing.

comment:3 in reply to: ↑ 2 Changed 4 years ago by hasienda

  • Owner changed from mgood to hasienda
  • Status changed from new to assigned

Replying to hasienda:

Patch has been applied to current trunk version and successfully tested with Trac 0.12 right now. A click without selection does just nothing.

While the application has been tested now for some weeks, commit to trunk is still pending. But I'll do it soon, and can do myself, as I've taken over maintainership recently.

comment:4 Changed 4 years ago by hasienda

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [9319]) AccountManagerPlugin: Add a simple input check, closes #3343.

Add Comment

Modify Ticket

Action
as closed The owner will remain hasienda.
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.