So damn simple that i am embarrassed :D
Now my news get added with user.
Thanks :)
--
(8)
[EMAIL PROTECTED] wrote:
Good question, according to the documentation it should work, I'll
push this onto the mod_python mailing list for discussion and get a
bug report posted if necessary.
In the meantime,
Okay, reason it doesn't work is that req.get_basic_auth_pw() only
applies when using Apache itself to perform the user authentication.
Ie., where in Apache configuration files you have something like:
AuthType Basic
AuthName "VIP"
AuthUserFile /tmp/pwdb
Require user noppa
It doesn't work
Good question, according to the documentation it should work, I'll
push this onto the mod_python mailing list for discussion and get a
bug report posted if necessary.
In the meantime, you could use the following work around:
def __auth__(req, user, passwd):
req.user = user
if user == 'n
apache conf
SetHandler mod_python
PythonHandler mod_python.publisher
and this is in /python-publisher/index.py
__auth_realm__ = 'VIP'
def __auth__(req, user, passwd):
if user == 'noppa' and passwd == 'potti':
return True
else:
return False
def __access__(req, use