I am having a problem with roles and permissions. I find that I cannot access some pages on my site unless I have the role Manager, although I have tried to customize the roles and permissions so that other roles can access this content. Actually, this used to be working and now it is no longer working and I'm trying to figure out what has changed. When I try and access the protected content, I am prompted for a user name and passwd. If I enter a user who does not have the Manager role, I get the error You are not authorized to access this resource. Username and password are not correct. If I add the Manager role for that user, however, I can then access the content. The site is built as a python Product, and I am using ClassSecurityInfo to manage my permissions and roles for the various methods. My question is: is there any way I can get better diagnostic information for debugging, for example what resource I am trying to acquire that I don't have permission for? I've checked the Z2.log but there is no helpful information there. On a related note, is there any way to get zope to give full tracebacks rather than the limited tracebacks it supplies by default? Thanks, John Hunter zope 2.7
Hi John, Have you tried try: whatever except: <dtml-var error_tab> That should give a full traceback. David ----- Original Message ----- From: "John Hunter" <jdhunter@ace.bsd.uchicago.edu> To: "Zope Users" <zope@zope.org> Sent: Tuesday, August 03, 2004 7:33 PM Subject: [Zope] debug info
I am having a problem with roles and permissions. I find that I cannot access some pages on my site unless I have the role Manager, although I have tried to customize the roles and permissions so that other roles can access this content. Actually, this used to be working and now it is no longer working and I'm trying to figure out what has changed.
When I try and access the protected content, I am prompted for a user name and passwd. If I enter a user who does not have the Manager role, I get the error
You are not authorized to access this resource. Username and password are not correct.
If I add the Manager role for that user, however, I can then access the content.
The site is built as a python Product, and I am using ClassSecurityInfo to manage my permissions and roles for the various methods.
My question is: is there any way I can get better diagnostic information for debugging, for example what resource I am trying to acquire that I don't have permission for? I've checked the Z2.log but there is no helpful information there.
On a related note, is there any way to get zope to give full tracebacks rather than the limited tracebacks it supplies by default?
Thanks, John Hunter
zope 2.7 _______________________________________________ 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 )
John, Sorry, its error_tb not error_tab. David ----- Original Message ----- From: "David Hassalevris" <bluepaul@earthlink.net> To: "Zope Users" <zope@zope.org>; "John Hunter" <jdhunter@ace.bsd.uchicago.edu> Sent: Tuesday, August 03, 2004 8:37 PM Subject: Re: [Zope] debug info
Hi John,
Have you tried
try:
whatever
except: <dtml-var error_tab>
That should give a full traceback.
David
----- Original Message ----- From: "John Hunter" <jdhunter@ace.bsd.uchicago.edu> To: "Zope Users" <zope@zope.org> Sent: Tuesday, August 03, 2004 7:33 PM Subject: [Zope] debug info
I am having a problem with roles and permissions. I find that I cannot access some pages on my site unless I have the role Manager, although I have tried to customize the roles and permissions so that other roles can access this content. Actually, this used to be working and now it is no longer working and I'm trying to figure out what has changed.
When I try and access the protected content, I am prompted for a user name and passwd. If I enter a user who does not have the Manager role, I get the error
You are not authorized to access this resource. Username and password are not correct.
If I add the Manager role for that user, however, I can then access the content.
The site is built as a python Product, and I am using ClassSecurityInfo to manage my permissions and roles for the various methods.
My question is: is there any way I can get better diagnostic information for debugging, for example what resource I am trying to acquire that I don't have permission for? I've checked the Z2.log but there is no helpful information there.
On a related note, is there any way to get zope to give full tracebacks rather than the limited tracebacks it supplies by default?
Thanks, John Hunter
zope 2.7 _______________________________________________ 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 )
_______________________________________________ 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 )
"David" == David Hassalevris <bluepaul@earthlink.net> writes:
David> Hi John, Have you tried David> try: David> whatever David> except: <dtml-var error_tab> David> That should give a full traceback. I'm not using dtml in many places - rather the python API. Often times I call a method which calls other methods, etc. What I would really like is to set a debug mode so that zope always reports the full traceback, or at least a log where I can get this. Is there no hook or mode I can set to enable this? JDH
David> Hi John, Have you tried
David> try:
David> whatever
David> except: <dtml-var error_tab>
David> That should give a full traceback.
I'm not using dtml in many places - rather the python API. Often times I call a method which calls other methods, etc. What I would really like is to set a debug mode so that zope always reports the full traceback, or at least a log where I can get this.
Is there no hook or mode I can set to enable this?
standard_error_message? there you should be able to do whatever you want with error message, log or print it on screen. Vahur
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 4 Aug 2004 12:33 pm, John Hunter wrote:
My question is: is there any way I can get better diagnostic information for debugging, for example what resource I am trying to acquire that I don't have permission for? I've checked the Z2.log but there is no helpful information there.
Install VerboseSecurity: http://hathaway.freezope.org/Software/VerboseSecurity Richard -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBEFzvrGisBEHG6TARAkZlAJ0WtXlBXSsPqoDK14el6PcieVXRbACdHudt ADJdVCKXIeMAgdrZJlLPJFk= =JqVc -----END PGP SIGNATURE-----
participants (4)
-
David Hassalevris -
John Hunter -
Richard Jones -
Vahur Rebas