Zope: Setting up the default authorize script

Zope: Setting up the default authorize script

What is an authorize Script?

An authorize script is a Python Script object which is passed a dictionary containing the current users Purdue Electronic Directory information. The script does some processing and returns a list of role names that should be assigned to that user.

This allows you to dynamically assign roles to a user when they log into a web site. For example, your authorize script could assign the role "West Lafayette Person" if the directory information you has their campus set to "West Lafayette". You can also maintain a static list of people who should be given a particular role.

How do I create an authorize Script?

Open the Zope Management Interface for the folder where you would like to create the authorize script. Once the page has loaded add "system" to the URL in the location bar of the browser and press Enter.

Example:

  https://engineering.purdue.edu/ECN/manage_main

  becomes

  https://engineering.purdue.edu/ECN/system

A screen with several options will load. These are the ECN System Tools.

Screenshot of the ECN System Tools page.

Click the link titled, "Setup Authorization for Site Maintainers". This will load the detailed description of what the tool will do. If you are interested click read the details, if not scroll to the bottom of the page and click the "Create Tools to Authorize Site Maintainers" button. This will return you to the Zope Management Interface for your folder. You will see three new objects created.

Screenshot of Authorize Script Created message.

You can now grant users the "Manager" or "Maintainer" role by adding their fully qualified name to the "authorizeManagers" or "authorizeMaintainers" lists respectively.

Screenshot of Site Managers List in Zope.

Last modified: 2007/10/25 12:43:2.157000 GMT-4 by brian.r.brinegar.1
Created: 2007/10/25 12:43:2.157000 GMT-4 by brian.r.brinegar.1.

Categories

Search the Knowledge Base

Include:

Quick search results

    Admin Options: Edit this Document