PHP Classes

File: web/SSO/config-templates/acl.php

Recommend this page to a friend!
  Classes of william amed   Raptor 2   web/SSO/config-templates/acl.php   Download  
File: web/SSO/config-templates/acl.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Raptor 2
Framework that takes routes from annotations
Author: By
Last change:
Date: 8 years ago
Size: 1,595 bytes
 

Contents

Class file image Download
<?php

/*
 * This file defines "named" access control lists, which can
 * be reused in several places.
 */
$config = array(

   
'adminlist' => array(
       
//array('allow', 'equals', 'mail', 'admin1@example.org'),
        //array('allow', 'has', 'groups', 'admin'),
        /* The default action is to deny access. */
   
),

   
'example-simple' => array(
        array(
'allow', 'equals', 'mail', 'admin1@example.org'),
        array(
'allow', 'equals', 'mail', 'admin2@example.org'),
       
/* The default action is to deny access. */
   
),

   
'example-deny-some' => array(
        array(
'deny', 'equals', 'mail', 'eviluser@example.org'),
        array(
'allow'), /* Allow everybody else. */
   
),

   
'example-maildomain' => array(
        array(
'allow', 'equals-preg', 'mail', '/@example\.org$/'),
       
/* The default action is to deny access. */
   
),

   
'example-allow-employees' => array(
        array(
'allow', 'has', 'eduPersonAffiliation', 'employee'),
       
/* The default action is to deny access. */
   
),

   
'example-allow-employees-not-students' => array(
        array(
'deny', 'has', 'eduPersonAffiliation', 'student'),
        array(
'allow', 'has', 'eduPersonAffiliation', 'employee'),
       
/* The default action is to deny access. */
   
),

   
'example-deny-student-except-one' => array(
        array(
'deny', 'and',
            array(
'has', 'eduPersonAffiliation', 'student'),
            array(
'not', 'equals', 'mail', 'user@example.org'),
        ),
        array(
'allow'),
    ),

   
'example-allow-or' => array(
        array(
'allow', 'or',
            array(
'equals', 'eduPersonAffiliation', 'student', 'member'),
            array(
'equals', 'mail', 'someuser@example2.org'),
        ),
    ),

   
'example-allow-all' => array(
        array(
'allow'),
    ),

);