Modify

Opened 7 years ago

Closed 18 months ago

#1924 closed defect (wontfix)

[patch] Doesn't read group_file from global config

Reported by: ken.dunnington@… Owned by: cliechti
Priority: normal Component: TracHtGroupEditorPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.10

Description

The plugin requires the group_file setting to be in the local trac.ini file. Using only a [htgroup-editor] section in the global /etc/trac/trac.ini will yield this stacktrace when trying to access the admin:

Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/var/lib/python-support/python2.5/trac/web/main.py", line 237, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.5/site-packages/TracWebAdmin-0.1.2dev_r4429-py2.5.egg/webadmin/web_ui.py", line 109, in process_request
    path_info)
  File "build/bdist.linux-i686/egg/htgroups_edit/admin.py", line 28, in process_admin_request
    return self._do_htgroup(req)
  File "build/bdist.linux-i686/egg/htgroups_edit/admin.py", line 35, in _do_htgroup
    groups = self.get_groups()
  File "build/bdist.linux-i686/egg/htgroups_edit/admin.py", line 103, in get_groups
    group_file_name = self.get_group_filename()
  File "build/bdist.linux-i686/egg/htgroups_edit/admin.py", line 98, in get_group_filename
    return group_file_name
UnboundLocalError: local variable 'group_file_name' referenced before assignment

Attachments (3)

group_file_detection_failure_fix-anyrelease-r1949.diff (1.3 KB) - added by jesse.luna@… 7 years ago.
No error when [htgroup-editor] and [account-manager] are not defined.
group_file_parent_specification_hack-anyrelease-r1949.diff (689 bytes) - added by jesse.luna@… 7 years ago.
Hack to enable parent configuration support (should work on 0.10, 0.11dev).
group_file_parent_specification_really_fix-anyrelease.diff (769 bytes) - added by jesse.luna@… 7 years ago.
Hack to enable parent configuration support (depends on group_file_detection_failure_fix.diff, conflicts with group_file_parent_specification_hack.diff).

Download all attachments as: .zip

Change History (7)

Changed 7 years ago by jesse.luna@…

No error when [htgroup-editor] and [account-manager] are not defined.

Changed 7 years ago by jesse.luna@…

Hack to enable parent configuration support (should work on 0.10, 0.11dev).

comment:1 Changed 7 years ago by anonymous

  • Summary changed from Doesn't read group_file from global config to [patch] Doesn't read group_file from global config

comment:2 Changed 7 years ago by jesse.luna@…

Oops...

Change

-        has_section = lambda section: section in self.config

to

+        has_section = lambda section: section in self.config._sections

to use the parent config hack.

comment:3 Changed 7 years ago by jesse.luna@…

I should have paid attention to the design a little bit more. This one should finally fix it! Don't apply the hack or the patch will conflict.

Changed 7 years ago by jesse.luna@…

Hack to enable parent configuration support (depends on group_file_detection_failure_fix.diff, conflicts with group_file_parent_specification_hack.diff).

comment:4 Changed 18 months ago by rjollos

  • Resolution set to wontfix
  • Status changed from new to closed

Plugin is deprecated in favor of the UserManagerPlugin or HtGroupEditorPlugin.

Add Comment

Modify Ticket

Action
as closed .
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.