From 0c24e4e8f7a27d95cbc352b2c08a23bd2798bbee Mon Sep 17 00:00:00 2001
From: Raphael Jackstadt Let's get started :)
First, we will load the Aauth Library into the system
-
+
+
Loading Library
That was easy!
+Now let's create two new users, Frodo
and Legolas
.
$this->aauth->create_user('frodo@example.com','frodopass','Frodo Baggins');
@@ -91,6 +94,8 @@ First, we will load the Aauth Library into the system
We now we have two users.
+
+
Create GroupsOK, now we can create two groups, hobbits
and elves
.
$this->aauth->create_group('hobbits');
@@ -102,11 +107,15 @@ First, we will load the Aauth Library into the system
OK, now we have two groups and three users.
+
+
Create PermissionsLet's create two permissions walk_unseen
and immortality
$this->aauth->create_perm('walk_unseen');
$this->aauth->create_perm('immortality');
+
+
Grant/Revoke Groups PermissionsOk, now let's give accesses to our groups. The Hobbits seem to have ability to walk unseen, so we will assign that privilage to them. The Elves have imortality, so we will assign that privilage to them.
We will assign access with allow_group()
function.
@@ -120,10 +129,14 @@ We will assign access with allow_group()
function.
$this->aauth->deny('hobbits','immortality');
+
+
Grant User PermissionsGandalf can also live forever.
$this->aauth->allow_user(12,'immortality');
+
+
Permission Check Users/GroupsOk now let's check if Hobbits have immortality
.
if($this->aauth->is_group_allowed('hobbits','immortality')){
@@ -197,16 +210,17 @@ We will assume we already have a permission set up named travel
.$this->aauth->send_pm(3,4,'New cloaks','These new cloaks are fantastic!')
-
+ Banning users Banning Users
Frodo has broke the rules and will now need to be banned from the system.
$this->aauth->ban_user(3);
+
You have reached the end of the Quick Start Guide, but please take a look at the detailed Documentation Wiki for additional information.
Don't forget to keep and eye on Aauth, we are constantly improving the system.
-You can also contribute and help me out. :)
+You can also contribute and help us out. :)
-Wait a minute! Hobbits should not have immortality
. We need to fix this, we can use deny()
to remove the permission.
+Wait a minute! Hobbits should not have immortality
. We need to fix this, we can use deny_group()
to remove the permission.
-$this->aauth->deny('hobbits','immortality');
+$this->aauth->deny_group('hobbits','immortality');
Grant User Permissions