git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1466 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
91 lines
2.5 KiB
PHP
91 lines
2.5 KiB
PHP
<?php
|
|
/** DomFramework
|
|
@package domframework
|
|
@author Dominique Fournier <dominique@fournier38.fr> */
|
|
|
|
/** All the needed functions to authorize or deny access to an authenticated
|
|
user */
|
|
class authorization
|
|
{
|
|
/** Separator between differents modules/objects */
|
|
private $separator = "/";
|
|
|
|
/** Establish a connexion to the authorization database */
|
|
public function connect ()
|
|
{
|
|
}
|
|
|
|
/** Create the structure to store the authorization database */
|
|
public function initialize ()
|
|
{
|
|
}
|
|
|
|
/** Return if the user right is NONE, READ, WRITE, EXECUTE
|
|
if the object doesn't exists, or is not readable, throw an exception
|
|
@param string $object The object path to examine
|
|
@return NONE, READ, WRITE, EXECUTE */
|
|
public function validate ($object)
|
|
{
|
|
}
|
|
|
|
/** Add a new object, with owner and group, and mode bits
|
|
@param string $object Object path to add
|
|
@param integer $owner Owner ID of the object
|
|
@param integer $group Group ID of the object
|
|
@param integer $modbits Bits of authorization */
|
|
public function add ($object, $owner, $group, $modbits)
|
|
{
|
|
}
|
|
|
|
/** Remove the informations about an object
|
|
@param string $object Object path to drop */
|
|
public function drop ($object)
|
|
{
|
|
}
|
|
|
|
/** Change the owner of an object
|
|
Need to be the root administrator
|
|
@param string $object Object path to add
|
|
@param integer $owner Owner ID of the object */
|
|
public function chown ($object, $owner)
|
|
{
|
|
}
|
|
|
|
/** Change the group of an object
|
|
Need to be the owner of the object or the root administrator
|
|
@param string $object Object path to add
|
|
@param integer $group Group ID of the object */
|
|
public function chgrp ($object, $group)
|
|
{
|
|
}
|
|
|
|
/** Change mode bits for an object
|
|
Need to be the owner of the object or the root administrator
|
|
@param string $object Object path to change
|
|
@param integer $mod Bits of authorization */
|
|
public function chmod ($object, $mod)
|
|
{
|
|
}
|
|
|
|
/** Return the mode bits for an object if all his parents are readable for
|
|
the user
|
|
@param string $object Object path to examine */
|
|
public function lsmod ($object)
|
|
{
|
|
}
|
|
|
|
/** Return the owner for an object if all his parents are readable for
|
|
the user
|
|
@param string $object Object path to examine */
|
|
public function lsown ($object)
|
|
{
|
|
}
|
|
|
|
/** Return the owner for an object if all his parents are readable for
|
|
the user
|
|
@param string $object Object path to examine */
|
|
public function lsgrp ($object)
|
|
{
|
|
}
|
|
}
|