+

Search Tips   |   Advanced Search

Lifecycle - Portal Access Control

PacList objects are read from and written back to the portal by using getacl and setacl in the Access bean. The command getacl returns the PacList object for a resource. It expects the category and identifier of the resource as arguments. The category identifies the Script bean that is responsible for the resource. It is given as a keyword, which can be the bean name or the type of the resource. The supported keywords are documented in the help for the Access bean. PacList objects are obtained only for resources that are handled by the Content and Portlet beans. For the root node of the portlet repository, there are no PacList objects.

The command setacl writes a PacList object back to the portal. That command is necessary only if the PacList object is modified. The PacList object is the only argument to the command. Each PacList object is tied to a particular resource and cannot be written for any other resource.

Jython example:

Jacl example:

To access or manipulate a PacList object, it must be loaded in the PacList bean. The operations of the PacList bean always refer to the PacList object currently loaded. An object can be loaded only for viewing by using view, or for manipulation by using edit. Both commands expect the PacList object as an argument. The PacList bean is loaded only if it is unloaded, or if it is loaded with an object that is not modified. Jython example:

Jacl example:

The command current returns the name of the loaded object, which includes the identifier of the resource. The command done unloads the PacList bean and returns the object that was loaded. If the PacList bean is already unloaded, done still returns the PacList object that was loaded before, which is useful for dealing with errors.

If the currently loaded PacList object is modified since it was loaded, the command modified returns. If the keyword numeric is added, it returns the value of the flag as a Boolean 1 or 0. Without the keyword, it returns a string true or false. Jython example:


Jacl
example:

Parent topic: Portal Access Control