laravel 8

This commit is contained in:
Denis Duliçi
2020-10-14 17:07:59 +03:00
parent b4e044b199
commit 1ba8835a2d
134 changed files with 3515 additions and 1952 deletions

View File

@ -67,30 +67,6 @@ return [
'expiration_time' => 3600,
],
/*
|--------------------------------------------------------------------------
| Use teams feature in the package
|--------------------------------------------------------------------------
|
| Defines if Laratrust will use the teams feature.
| Please check the docs to see what you need to do in case you have the package already configured.
|
*/
'use_teams' => false,
/*
|--------------------------------------------------------------------------
| Strict check for roles/permissions inside teams
|--------------------------------------------------------------------------
|
| Determines if a strict check should be done when checking if a role or permission
| is attached inside a team.
| If it's false, when checking a role/permission without specifying the team,
| it will check only if the user has attached that role/permission ignoring the team.
|
*/
'teams_strict_check' => false,
/*
|--------------------------------------------------------------------------
| Laratrust User Models
@ -132,7 +108,6 @@ return [
* Team model
*/
'team' => 'App\Models\Auth\Team',
],
/*
@ -173,7 +148,6 @@ return [
* Permission - Role intermediate table.
*/
'permission_role' => 'role_permissions',
],
/*
@ -204,7 +178,6 @@ return [
* Role foreign key on Laratrust's role_user and permission_user tables.
*/
'team' => 'team_id',
],
/*
@ -236,7 +209,8 @@ return [
* Aborts the execution with a 403 code.
*/
'abort' => [
'code' => 403
'code' => 403,
'message' => 'User does not have any of the necessary access rights.'
],
/**
* Redirects the user to the given url.
@ -254,14 +228,123 @@ return [
]
],
'teams' => [
/*
|--------------------------------------------------------------------------
| Use teams feature in the package
|--------------------------------------------------------------------------
|
| Defines if Laratrust will use the teams feature.
| Please check the docs to see what you need to do in case you have the package already configured.
|
*/
'enabled' => false,
/*
|--------------------------------------------------------------------------
| Strict check for roles/permissions inside teams
|--------------------------------------------------------------------------
|
| Determines if a strict check should be done when checking if a role or permission
| is attached inside a team.
| If it's false, when checking a role/permission without specifying the team,
| it will check only if the user has attached that role/permission ignoring the team.
|
*/
'strict_check' => false,
],
/*
|--------------------------------------------------------------------------
| Laratrust Magic 'can' Method
| Laratrust Magic 'isAbleTo' Method
|--------------------------------------------------------------------------
|
| Supported cases for the magic can method (Refer to the docs).
| Supported cases for the magic is able to method (Refer to the docs).
| Available: camel_case|snake_case|kebab_case
|
*/
'magic_can_method_case' => 'kebab_case',
'magic_is_able_to_method_case' => 'kebab_case',
/*
|--------------------------------------------------------------------------
| Laratrust Panel
|--------------------------------------------------------------------------
|
| Section to manage everything related with the admin panel for the roles and permissions.
|
*/
'panel' => [
/*
|--------------------------------------------------------------------------
| Laratrust Panel Register
|--------------------------------------------------------------------------
|
| This manages if routes used for the admin panel should be registered.
| Turn this value to false if you don't want to use Laratrust admin panel
|
*/
'register' => false,
/*
|--------------------------------------------------------------------------
| Laratrust Panel Path
|--------------------------------------------------------------------------
|
| This is the URI path where Laratrust panel for roles and permissions
| will be accessible from.
|
*/
'path' => 'laratrust',
/*
|--------------------------------------------------------------------------
| Laratrust Panel Path
|--------------------------------------------------------------------------
|
| The route where the go back link should point
|
*/
'go_back_route' => '/',
/*
|--------------------------------------------------------------------------
| Laratrust Panel Route Middleware
|--------------------------------------------------------------------------
|
| These middleware will get attached onto each Laratrust panel route.
|
*/
'middleware' => ['web'],
/*
|--------------------------------------------------------------------------
| Enable permissions assignment
|--------------------------------------------------------------------------
|
| Enable/Disable the permissions assignment to the users.
|
*/
'assign_permissions_to_user' => true,
/*
|--------------------------------------------------------------------------
| Add restriction to roles in the panel
|--------------------------------------------------------------------------
|
| Configure which roles can not be editable, deletable and removable.
| To add a role to the restriction, use name of the role here.
|
*/
'roles_restrictions' => [
// The user won't be able to remove roles already assigned to users.
'not_removable' => [],
// The user won't be able to edit the role and the permissions assigned.
'not_editable' => [],
// The user won't be able to delete the role.
'not_deletable' => [],
],
],
];