Download the PHP package cyrixbiz/acl without Composer
On this page you can find all versions of the php package cyrixbiz/acl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package acl
Short Description An Access Control List for Laravel without Gates
License
Informations about the package acl
An Access Control List for Laravel
With this ACL is it possible to protect routes as well as single methods / functions It's possible to give Single authorizations to users or to divide into roles which can also get single authorizations.
Install the ACL
-
Composer
-
Edit config\app and add the following lines
-
Got to your User Model - Default Value: App\Models\User.php and set this
-
Install all
-
Install a Single Method
-
Allow Arguments:
- setAuth ( Laravel Auth )
- setRoutes ( ACL Routes to web.php )
- setResourceFiles ( Lang and View Files)
- setTables ( Set Database Tables )
- setSeeds ( Insert Database Seeds)
- setAdmin ( Set an Admin )
-
Allow Options
-
setAdmin --admin=Adminname --admin=AdminMail --admin=AdminPassword
Rules = Name 5 Letters Email Valid-Email and Unique Password = Min. 8 Signs and 3 of 4 Rules 1 Low- and 1 Upper- Case / 1 Number / Special Chars
-
-
-
Edit App\Http\Kernel and add the following lines
-
Error - Handling
Exception: PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes")
Fix this Issue:
- App\Providers
Config - File
-
ACL
-
Enable / Disable the Routeprotection
'enable' => true | false
-
Method to check the Routes
'method' => getActionName | getName
Description: If i use the method 'getActionName', the controller will be used and dissolved for the determination of the resources. Out of the rolecontroller@index it will create role.index. If u use the method 'getName', the alias of the controller will be used for the determination.
'fallback' => getActionName | getName
Description: Set a Fallback to Check the Method
-
Set a Secure User
'superAdmin' => 1 - UserID
Description: This User has Full Rights and can't be deleted
-
Set a newMemberRole
'newMemberRole' => 3 - UserID
Description: Members receive this Role after an active registration
- Set a Blocked Role
'blockedRole' => 5 - RoleID
Description: This Role has zero Rights and can't be deleted. Set a User to this Role and all other Roles and Resources will be deleted.
-
-
Cache
- Set Cache Time in Seconds
'time' => '60'
Description: This Method set the Time to Cache the User-Resources
- Set Cache Time in Seconds
Usage
Middleware
For Example: Set this to your Route-File and all routes in this group are checked
- routes/web
Blade
For Example: Single Check @perm @endperm
For Example: Multi Check @perms @endperms
For Example: Multi Check, One must true @orPerms @endorPerms