Add Authorization in docs

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1478 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2014-06-20 13:25:31 +00:00
parent c2c5ea42ab
commit 954fdfdfc0

View File

@@ -198,6 +198,24 @@ The fields are defined by :
The CSRF parameter is verify automatically when using $f->values ();
In case of error, an exception is raised.
10. Authentication / Authorization
----------------------------------
The Authentication/Authorization module permits to allow/deny access to objects.
The user must be validated before using a information. It is based on Unix
model, with users/groups/modbits, files (objects) with owner/group/modbits.
To do that, you can use a table in your database:
$auth = new authorizationdb ();
$auth->connectdb ($this->database["dsn"], $this->database["username"],
$this->database["password"],
$this->database["driver_options"]);
Then add the objects with the rights :
$auth->add ("/module/<object>", $auth->authiduser,
reset ($auth->authgroups), 0755);
You can remove the objects with :
$auth->del ("/module/<object>");
You can see if the user can access to the object with READ, WRITE, EXECUTE :
$auth->validate ("/module/<object>")
XX. CLI usage
-------------
The DomFramework is designed to be used in console line too.