Modify

Opened 17 years ago

Closed 11 years 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@… 17 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@… 17 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@… 17 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 17 years ago by jesse.luna@…

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

Changed 17 years ago by jesse.luna@…

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

comment:1 Changed 17 years ago by anonymous

Summary: Doesn't read group_file from global config[patch] Doesn't read group_file from global config

comment:2 Changed 17 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 17 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 17 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 11 years ago by Ryan J Ollos

Resolution: wontfix
Status: newclosed

Plugin is deprecated in favor of the UserManagerPlugin or HtGroupEditorPlugin.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain cliechti.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.