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:
18
docs/USAGE
18
docs/USAGE
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user