Groupe 1A (socle)

Creation Date: 29 novembre 2004
Last update : 08 fevrier 2005
mode : internet

Utility to load permission

This document describes how to use the utility of loading of permission developed by Esup-Portail.

This utility is included in the packages esup, (to consult the CHANGELOG of the package in order to know if it is available in your version)

Principle

The purpose of this utility is to act on the permission of uPortal via ant. It has the following methods:

Use

This utility is based on a file XML making it possible to define the actions has to carry out.

By defect, the file used is properties/groups/GroupsPermLoad.xml

It supports the parameter dataFile, which makes it possible to use another file of configuration.

Example :

ant esup.groups.perm.load -DdataFile=/properties/groups/myGroupsPerm.xml

You also have one file example:

Configuration file :

Example :

<?xml version="1.0" encoding="UTF-8" ?> 
<Perm-Loading failonerror="true">
<!-- BE CAREFUL BEFORE RUN SWITCH JNDI TO OFF in portal.properties and PersonDirs.xml -->
<permAdd targetName="Tous les groupes de personnes" principalsName="Information" activity="VIEW" type="GRANT" />
<permAdd targetKey="local.0" principalsName="Etablissement" activity="VIEW" type="DENY" />
<permAdd targetKey="local.0" principalsName="Etablissement" activity="SELECT" type="DENY" />
<permAdd targetKey="local.0" principalsName="Etablissement" activity="ADD/REMOVE" type="GRANT" />
<permAdd targetName="Comptabilite" principalsKey="local.102" activity="SELECT" type="GRANT" />
<permAdd targetName="Comptabilite" principalsKey="local.102" activity="VIEW" type="DENY" /> <permAdd targetName="Comptabilite" principalsUid="admin" activity="VIEW" type="DENY" />
<!-- delete all permission of principals on target !-->
<permDel targetName="Tous les groupes de personnes" principalsName="Information" />
<permDel targetKey="local.0" principalsName="Etablissement" /> </Perm-Loading>

This file is an example, to in no case this file will not go.

The file is treated from top to bottom.

The groups (target or principal) can be described by their name or their key.

failonerror

This flag enables you to specify the behavior of the utility:

Addition of a permission (permAdd)

Attributes :

Suppression of a permission (permDel)

Attributes :

This action removes all the permissions of the principals group on the target group.