panSL main page

panSL language reference. Table of contents.

GivingRole

May be specified for PropertyTypes of DataType Relation, for two purposes:

A) To give the related entity role as Owner of the given entity.
B) To give the related entity role as Administrator (of the whole database).

Example A), giving a Person-entity role as Owner of a Family-entity:


Family                 ReadEveryone ChangeOwner
   Name
   Family_membersship  RelationMany GivingOwner
Person                 ReadEveryone ChangeOwner
   First_name
   Last_name
   Family_membersship  RelationOne
   Mobil_phone         SMS

It is not possible to log-in as a Family. Therefore Person-entities related to a given Family is given Role as Owner.
This makes it possible for a Person to edit his own Family.
(In this example log-in is performed by requesting a one-time password as SMS-message to a given mobil-phone number.)

Example B), giving a Person-entity role as Administrator (of the whole database):

Administrator_group
   Name
   Administrator_person   RelationMany GivingAdministrator
   History                Log
Person
   First_name
   Last_name
   Administrator_person   RelationOne
   Username               Username
   Password               Password

By creating an Administrator_group and relating it to a Person-entity the Person-entity would be granted Administrator-rights after log-in.
(In this example log-in is performed in the traditional manner by Username and Password.)

Field nameDescription

GivingAdministrator

The Relation gives the related entity role as Administrator (of the whole database) after log-in.

GivingOwner

The Relation gives the related entity role as Owner of the given entity.

panSL language reference. Table of contents.

More samples available at http://panSL.org/samples/.

Last updated 2012-05-02