tracing permission settings
Folks, When configuring a site with various roles and permissions, I often run into the following scenario: I have a user logged in with a somewhat restricted role (eg: Authenticated) that is not allowed access to certain resources, and he gets a login box popup. What I would like is for a way to tell exactly which resource needs the elevated permission, so I can simply go fix it. What techniques are possible here? Is there a debug setting/logging for a "permission denied" resource? Thanks, Roy.
From: "Roy Mathew" <roymath@yahoo.com>
I have a user logged in with a somewhat restricted role (eg: Authenticated) that is not allowed access to certain resources, and he gets a login box popup.
What I would like is for a way to tell exactly which resource needs the elevated permission, so I can simply go fix it.
Put the following lines into the dtml method 'standard_error_message' Error Type: <dtml-var error_type><br> Error Value: <dtml-var error_value><br> Error Traceback: <dtml-var error_tb><br> And then click on the 'Cancel' button when you are prompted for an id/pwd. This should give you an error message which describes the resource you are trying to access without permission. HTH Jonathan
Thanks for your help, Jonathan. I hadn't thought of modifying that method. For those who love ZPT, here is a roughly equivalent version: <metal:block tal:define="keys python:'error_type error_message error_tb'.split()" tal:repeat="key keys"> <b tal:content="key"/>: <i tal:content="structure python: options.get(key)"/><br> </metal:block> --- Small Business Services <toolkit@magma.ca> wrote:
From: "Roy Mathew" <roymath@yahoo.com>
I have a user logged in with a somewhat restricted role (eg: Authenticated) that is not allowed access to certain resources, and he gets a login box popup.
What I would like is for a way to tell exactly which resource needs the elevated permission, so I can simply go fix it.
Put the following lines into the dtml method 'standard_error_message'
Error Type: <dtml-var error_type><br> Error Value: <dtml-var error_value><br> Error Traceback: <dtml-var error_tb><br>
And then click on the 'Cancel' button when you are prompted for an id/pwd. This should give you an error message which describes the resource you are trying to access without permission.
HTH
Jonathan
__________________________________ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25� http://photos.yahoo.com/ph/print_splash
Roy Mathew wrote:
What I would like is for a way to tell exactly which resource needs the elevated permission, so I can simply go fix it.
Check out the VerboseSecurity product. I ran into a similar problem and this product pinpointed every detail.
Roy Mathew wrote:
What I would like is for a way to tell exactly which resource needs the elevated permission, so I can simply go fix it.
Check out the VerboseSecurity product. I ran into a similar problem and this product pinpointed every detail.
participants (3)
-
Kevin Carlson -
Roy Mathew -
Small Business Services