[ 
https://issues.apache.org/jira/browse/MODPYTHON-27?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Graham Dumpleton closed MODPYTHON-27.
-------------------------------------


> mod_python.publisher authentication
> -----------------------------------
>
>                 Key: MODPYTHON-27
>                 URL: https://issues.apache.org/jira/browse/MODPYTHON-27
>             Project: mod_python
>          Issue Type: New Feature
>          Components: publisher
>    Affects Versions: 3.1.4
>            Reporter: Graham Dumpleton
>         Assigned To: Graham Dumpleton
>            Priority: Minor
>             Fix For: 3.3
>
>
> The documentation for mod_python.publisher gives that more specific 
> authentication
> check can be performed on a function by using code:
> def sensitive(req):
>    def __auth__(req, user, password):
>       if user == 'spam' and password == 'eggs':
>         # let them in
>         return 1
>       else:
>         # no access
>         return 0
>    # something involving sensitive information
>    return 'sensitive information`
> Ie., authentication function can be nested inside the actual function.
> This only works for functions and not methods of a class. Thus, code could be 
> enhanced
> to allow it to work for MethodType as well as FunctionType. Method that needs 
> to be
> changed is process_auth() and it simply needs to track through im_func to get 
> to the
> func_code member.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to