Hi Miguel,
Is the dtml page accessable by the role "myuser" has? Did you set the
"Use Database Methods" permission for that role?
Hi Miguel
First, you could drop the Unauthorized Exception from the error_log
object in the root folder of the zope management interface. Then
activate the verbose-security option in your zope.conf file. To do
this, you need to put/replace this lines:
security-policy-implementation python
verbose-security on
After you have done this, you need to restart zope, try again your
authentication script, and take a look at your event.log file or
the error_log object. You may find the reason of why is this failing.
In case you don't find it, then place the full traceback here.
Best regards
Josef
Miguel Beltran R. schrieb:
I have this program what open a dtml what return a XML page, but I
have error with permisions:
import urllib, urllib2
pagina = "http://10.28.1.239/bitacoras/alta/estado2.html"
datos = {"btipo":"D",
"bholo":87654321,
"bplac":"dd-12345",
"accion":"alta_gasolina",
}
params=urllib.urlencode(datos)
aut=urllib2.HTTPBasicAuthHandler()
aut.add_password("AFICON", pagina, "myuser", "mypass")
opener=urllib2.build_opener(aut)
urllib2.install_opener(opener)
r=urllib2.urlopen(pagina,params)
print r.read()
r.close()
but returned XML say:
<ajax>
<accion>alta_gasolina</accion>
<respuesta>error</respuesta>
<error_type>Unauthorized</error_type>
<error_description>You are not allowed to access 'zsql_alta'
in this context</error_description>
</ajax>
help? how I can send HTTPBasicAuth?
pd. Sorry by my bad english
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )
--
Martijn Jacobs
Four Digits, Internet Solutions
a: Willemsplein 15-1 6811 KB Arnhem NL
kvk: 091621370000 | btw: 8161.22.234.B01
e-mail: [EMAIL PROTECTED] | web: http://www.fourdigits.nl
tel: +31 (0)26 44 22 700 | fax: +31 (0)84 22 06 117
_______________________________________________
Zope maillist - Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )