Opened 18 years ago
Closed 18 years ago
#547 closed defect (worksforme)
Problems installing the plugin globally
Reported by: | Owned by: | Matt Good | |
---|---|---|---|
Priority: | normal | Component: | AccountManagerPlugin |
Severity: | normal | Keywords: | needinfo |
Cc: | Trac Release: | 0.9 |
Description
What I did:
Installed the plugin into site-packages, unziped with:
easy_install --always-unzip TracAccountManager-0.1.2.egg
Things that happened:
- The templates for form based logins weren't detected until I copied them into the global template directory.
- On a login attempt, the plugin couldn't find an account-manager.password_format setting, for
some reason. It made no difference as to whether the settings where in the site wide or instance specific trac.ini
.
It works correctly when the egg file is placed under the instance plugin directory,
Attachments (0)
Change History (6)
comment:1 Changed 18 years ago by
Keywords: | needinfo added |
---|
comment:2 Changed 18 years ago by
If I use AccountManagerPlugin as a plugin inside a trac environment, all is working well.
If I use the AccountManagerPlugin as a global plugin under the lib/python2.4/site-package
, I get this error:
File "/usr/local/stow/python-2.4.3/lib/python2.4/site-packages/TracAccountManager-0.1.2.egg/acct_mgr/web_ui.py", line 160, in wrap return func(self, *args, **kwds) File "/usr/local/stow/python-2.4.3/lib/python2.4/site-packages/TracAccountManager-0.1.2.egg/acct_mgr/web_ui.py", line 167, in authenticate req.remote_user = self._remote_user(req) File "/usr/local/stow/python-2.4.3/lib/python2.4/site-packages/TracAccountManager-0.1.2.egg/acct_mgr/web_ui.py", line 189, in _remote_user req.args.get('password')): File "/usr/local/stow/python-2.4.3/lib/python2.4/site-packages/TracAccountManager-0.1.2.egg/acct_mgr/api.py", line 94, in check_password return self.password_store.check_password(user, password) File "/usr/local/stow/python-2.4.3/lib/python2.4/site-packages/TracAccountManager-0.1.2.egg/acct_mgr/api.py", line 105, in password_store raise TracError('No password store found. Please configure ' TracError: No password store found. Please configure "account-manager.password_format" in trac.ini.
The trac.ini
is the same and contains:
[account-manager] password_format = htpasswd password_file = /data/svn/etc/passwd
The
[components] trac.web.auth.LoginModule = disabled acct_mgr.web_ui.LoginModule = enabled
will be found and works as expected, but the [account-manager]
in the same trac.ini
will not be found :(
comment:3 Changed 18 years ago by
I've run into the same problem, though the error is a bit misleading.
Changed the error message in my install to:
raise TracError('Password store "%s" not found in "%s". Please configure '
'"account-manager.password_format" in trac.ini.' % (fmt, self.stores) )
This shows that "fmt" is indeed being picked up, but self.stores is an empty array.
comment:4 Changed 18 years ago by
More info: trac 0.9.6
installed from svn: easy_install --always-unzip http://trac-hacks.org/svn/accou ntmanagerplugin/0.9
trac.ini:
[components] acct_mgr.web_ui.LoginModule = disabled acct_mgr.web_ui.RegistrationModule = enabled [account-manager] password_format = htpasswd password_file = /var/access/trac.demo.htpasswd
comment:5 Changed 18 years ago by
Ok, you need to enable the component that actually handles the "htpasswd" format. That would be "acct_mgr.htfile.HtPasswdStore". You should also enable "acct_mgr.api.AccountManager".
I'm in the process of reworking the docs to provide some more explanation of all the components and when you should enable them, so hopefully this will be more clear shortly.
comment:6 Changed 18 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
The documentation has been updated regarding the enabling of components, so hopefully that will help.
The template problem was already fixed in r1064.
I always use the plugin installed globally, so I've never had problems with it not picking up the config. Can up update your installation from SVN? If it is still not working with a global install can you give a little more description of your config, specifically which modules of the AccountManagerPlugin you've enabled?