Actors API is a superset specification based in Security plus the Visual elements 's Scripting . The goal of this API is allowing the creation of easy-customizable application actors.
An actor is a given user complying with a group of constraints attached to the actor's name. An example would be:
PartnerNetwork=pfunc.anyOfSyndications(user, "partner,patron,contacts_admin")
The line configures the PartnerNetwork actor. In order to check if the visiting user is a PartnerNetwork, in Visuals we'll do:
user.isActor("PartnerNetwork")
Actors API is fully compliant with the collaboration modules. We can create specific actors for a large variety of entities. An example of an actor related to dossiers or categories:
ComissionMember=dpl.isParticipant(user)
Now we could check if the visitor is a ComissionMember with:
user.isActor(dossier, "ComissionMember")
The BaaS service provides a view where we can check users against all defined actors. It's also possible to perform the check using an entity.
It is possible to use scripting files with the directive file:file_name
. Scripting files are located in /WEB-INF/elephant/scripts
.