[DM] Refactor the ZPublisher's authentication code into a method to make it usable from the outside.

Bug #374744 reported by Andreas Jung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2
Invalid
Wishlist
Unassigned

Bug Description

2. Introduction

Zope's ZPublisher performs authentication at the end of the traversal.

For some applications, this is too late. An example is the setting of skins based on the user's authentication state (authenticated users see the site differently from unauthenticated users). For other applications, a preliminary check might be important to prevent access to services at the place where this special purpose is set up. An example is our ZopeRpc which wants to protect RPC use with a special permission. ZopeRpc therefore preliminary authenticates the user and checks that he has the required permission.

ZPublisher's authentication code is currently inline and not easily reusable for preliminary authentication.

3. Feature

Put ZPublisher's authentication code into the (new) method ZPublisher.BaseRequest.BaseRequest._authenticate.

This allows to easily reuse it for prelimary authentication.

Revision history for this message
Andreas Jung (ajung) wrote :
Changed in zope2:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see https://answers.launchpad.net/launchpad/+question/683589 and https://answers.launchpad.net/launchpad/+question/685285). If this bug is still relevant, please refile it at https://github.com/zopefoundation/zope2.

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.