diff --git a/app/Models/Manutenzione.php b/app/Models/Manutenzione.php index 381c9e4..10d5882 100644 --- a/app/Models/Manutenzione.php +++ b/app/Models/Manutenzione.php @@ -10,7 +10,7 @@ class Manutenzione extends Model { use HasFactory; - public static function saveRevisione($id,$data) + public static function saveManutenzione($id,$data) { DB::table('manutenziones')->insert([ 'fk_operazione_id'=>$id, diff --git a/app/Models/User.php b/app/Models/User.php index 75647d9..fbfb40c 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -9,11 +9,12 @@ use Illuminate\Notifications\Notifiable; use Laravel\Sanctum\HasApiTokens; //use LdapRecord\Laravel\Auth\Authenticatable; use LdapRecord\Laravel\Auth\AuthenticatesWithLdap; +use Junges\ACL\Concerns\HasGroups; class User extends Authenticatable { - use HasApiTokens, HasFactory, Notifiable, AuthenticateswithLdap; + use HasApiTokens, HasFactory, Notifiable, AuthenticateswithLdap, HasGroups; /** * The attributes that are mass assignable. diff --git a/composer.json b/composer.json index eb94d7a..aaf55f8 100644 --- a/composer.json +++ b/composer.json @@ -20,6 +20,7 @@ "laravel/tinker": "^2.5", "laravel/ui": "^3.4", "laraveldaily/laravel-charts": "^0.1.29", + "mateusjunges/laravel-acl": "^4.2", "rap2hpoutre/fast-excel": "^3.2", "secondtruth/startmin": "^1.1", "sfneal/view-export": "^2.10", diff --git a/composer.lock b/composer.lock index e481245..279f2ff 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "0f5a22e06d42bf673cc91f814328d245", + "content-hash": "54f5d58038210c158e2f6aa9ddac0439", "packages": [ { "name": "asm89/stack-cors", @@ -1133,6 +1133,59 @@ }, "time": "2022-09-18T07:06:19+00:00" }, + { + "name": "facade/ignition-contracts", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/facade/ignition-contracts.git", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^v2.15.8", + "phpunit/phpunit": "^9.3.11", + "vimeo/psalm": "^3.17.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Facade\\IgnitionContracts\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Freek Van der Herten", + "email": "freek@spatie.be", + "homepage": "https://flareapp.io", + "role": "Developer" + } + ], + "description": "Solution contracts for Ignition", + "homepage": "https://github.com/facade/ignition-contracts", + "keywords": [ + "contracts", + "flare", + "ignition" + ], + "support": { + "issues": "https://github.com/facade/ignition-contracts/issues", + "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" + }, + "time": "2020-10-16T08:27:54+00:00" + }, { "name": "fruitcake/laravel-cors", "version": "v2.2.0", @@ -2880,6 +2933,89 @@ }, "time": "2022-08-18T16:18:26+00:00" }, + { + "name": "mateusjunges/laravel-acl", + "version": "v4.2.1", + "source": { + "type": "git", + "url": "https://github.com/mateusjunges/laravel-acl.git", + "reference": "d4d41b897002218e11d6826e5b021ff4935ec19d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mateusjunges/laravel-acl/zipball/d4d41b897002218e11d6826e5b021ff4935ec19d", + "reference": "d4d41b897002218e11d6826e5b021ff4935ec19d", + "shasum": "" + }, + "require": { + "facade/ignition-contracts": "^1.0", + "illuminate/auth": "^8.0|^9.0", + "illuminate/container": "^8.0|^9.0", + "illuminate/database": "^8.0|^9.0", + "illuminate/support": "^8.0|^9.0", + "php": "^7.4|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.4", + "orchestra/testbench": "^6.0|^7.0", + "phpunit/phpunit": "^9.4", + "predis/predis": "^1.1" + }, + "suggest": { + "facade/igntion": "Needed to be able to use the ignition solutions for laravel-acl" + }, + "type": "laravel-package", + "extra": { + "laravel": { + "providers": [ + "Junges\\ACL\\Providers\\ACLServiceProvider", + "Junges\\ACL\\Providers\\ACLAuthServiceProvider", + "Junges\\ACL\\Providers\\ACLEventsServiceProvider" + ] + } + }, + "autoload": { + "files": [ + "src/helpers.php" + ], + "psr-4": { + "Junges\\ACL\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mateus Junges", + "email": "mateus@junges.dev", + "homepage": "https://twitter.com/mateusjungess", + "role": "Backend Software Engineer" + } + ], + "description": "This package provides a complete Access Control List management", + "homepage": "https://github.com/mateusjunges/laravel-acl", + "keywords": [ + "access-control-list", + "acl", + "junges", + "laravel", + "permissions", + "security" + ], + "support": { + "issues": "https://github.com/mateusjunges/laravel-acl/issues", + "source": "https://github.com/mateusjunges/laravel-acl" + }, + "funding": [ + { + "url": "https://github.com/mateusjunges", + "type": "github" + } + ], + "time": "2022-12-15T02:50:22+00:00" + }, { "name": "monolog/monolog", "version": "2.9.1", @@ -8495,59 +8631,6 @@ }, "time": "2023-01-26T12:34:59+00:00" }, - { - "name": "facade/ignition-contracts", - "version": "1.0.2", - "source": { - "type": "git", - "url": "https://github.com/facade/ignition-contracts.git", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/facade/ignition-contracts/zipball/3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "reference": "3c921a1cdba35b68a7f0ccffc6dffc1995b18267", - "shasum": "" - }, - "require": { - "php": "^7.3|^8.0" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^v2.15.8", - "phpunit/phpunit": "^9.3.11", - "vimeo/psalm": "^3.17.1" - }, - "type": "library", - "autoload": { - "psr-4": { - "Facade\\IgnitionContracts\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Freek Van der Herten", - "email": "freek@spatie.be", - "homepage": "https://flareapp.io", - "role": "Developer" - } - ], - "description": "Solution contracts for Ignition", - "homepage": "https://github.com/facade/ignition-contracts", - "keywords": [ - "contracts", - "flare", - "ignition" - ], - "support": { - "issues": "https://github.com/facade/ignition-contracts/issues", - "source": "https://github.com/facade/ignition-contracts/tree/1.0.2" - }, - "time": "2020-10-16T08:27:54+00:00" - }, { "name": "fakerphp/faker", "version": "v1.21.0", diff --git a/config/acl.php b/config/acl.php new file mode 100644 index 0000000..b63763f --- /dev/null +++ b/config/acl.php @@ -0,0 +1,106 @@ + [ + /* + | The model you want to use as Permission model must use the MateusJunges\ACL\Traits\PermissionsTrait + */ + 'permission' => Junges\ACL\Models\Permission::class, + + /* + | The model you want to use as Group model must use the MateusJunges\ACL\Traits\GroupsTrait + */ + 'group' => Junges\ACL\Models\Group::class, + ], + + /* + |-------------------------------------------------------------------------- + | Route Model Binding + |-------------------------------------------------------------------------- + | + | If you would like model binding to use a database column other than id when + | retrieving a given model class, you may override the getRouteKeyName method + | on the Eloquent model with yours. The default key used for route model binding + | in this package is the `id` database column. You can modify it by changing the + | following configuration: + | + */ + 'route_model_binding_keys' => [ + 'group_model' => 'id', + 'permission_model' => 'id', + ], + + /* + |-------------------------------------------------------------------------- + | Tables + |-------------------------------------------------------------------------- + | Specify the basics authentication tables that you are using. + | Once you required this package, the following tables are + | created by default when you run the command + | + | php artisan migrate + | + | If you want to change this tables, please keep the basic structure unchanged. + | + */ + 'tables' => [ + 'groups' => 'groups', + 'permissions' => 'permissions', + 'users' => 'users', + 'group_has_permissions' => 'group_has_permissions', + 'model_has_permissions' => 'model_has_permissions', + 'model_has_groups' => 'model_has_groups', + ], + + 'column_names' => [ + 'group_pivot_key' => null, + 'permission_pivot_key' => null, + 'model_morph_key' => 'model_id', + 'team_foreign_key' => 'team_id' + ], + + 'teams' => false, + + /* + |-------------------------------------------------------------------------- + | Ignition Solution Suggestions + |-------------------------------------------------------------------------- + | + | To enable the ignition solutions for laravel-acl, set this flag to true. + | + | The solutions will then be automatically registered with ignition if its installed. + | + */ + 'offer_solutions' => false, + + 'register_permission_check_method' => true, + + 'cache' => [ + /* + * All permissions are cached for 24 hours by default. If permissions or groups are updated, + * then the cache is flushed automatically. + */ + 'expiration_time' => DateInterval::createFromDateString('24 hours'), + + /* + * The cache key used to store permissions. + */ + 'key' => 'junges.acl.cache', + + /* + * You can optionally specify a cache driver to use for permissions caching using + * store drivers listed in config/cache.php. + */ + 'store' => 'default' + ] +]; diff --git a/database/migrations/2023_04_06_150643_create_permissions_table.php b/database/migrations/2023_04_06_150643_create_permissions_table.php new file mode 100644 index 0000000..87b28e1 --- /dev/null +++ b/database/migrations/2023_04_06_150643_create_permissions_table.php @@ -0,0 +1,29 @@ +bigIncrements('id'); + $table->string('name'); + $table->string('guard_name'); + $table->text('description')->nullable(); + $table->softDeletes(); + $table->timestamps(); + + $table->unique(['name', 'guard_name']); + }); + } + + public function down() + { + $tables = config('acl.tables'); + Schema::dropIfExists($tables['permissions']); + } +} diff --git a/database/migrations/2023_04_06_150645_create_groups_table.php b/database/migrations/2023_04_06_150645_create_groups_table.php new file mode 100644 index 0000000..7c7ccc7 --- /dev/null +++ b/database/migrations/2023_04_06_150645_create_groups_table.php @@ -0,0 +1,42 @@ +bigIncrements('id'); + + if ($teams || config("acl.testing")) { + $table->unsignedBigInteger($columnNames['team_foreign_key'])->nullable(); + $table->index($columnNames['team_foreign_key'], 'groups_team_foreign_key_index'); + } + + $table->string('name'); + $table->string('guard_name'); + $table->text('description')->nullable(); + $table->softDeletes(); + $table->timestamps(); + + if ($teams || config('acl.testing')) { + $table->unique([$columnNames['team_foreign_key'], 'name', 'guard_name']); + } else { + $table->unique(['name', 'guard_name']); + } + }); + } + + public function down() + { + $groupsTable = config('acl.tables.groups', 'groups'); + Schema::dropIfExists($groupsTable); + } +} diff --git a/database/migrations/2023_04_06_150647_create_model_has_permissions_table.php b/database/migrations/2023_04_06_150647_create_model_has_permissions_table.php new file mode 100644 index 0000000..87a9224 --- /dev/null +++ b/database/migrations/2023_04_06_150647_create_model_has_permissions_table.php @@ -0,0 +1,47 @@ +unsignedBigInteger(AclRegistrar::$pivotPermission); + $table->string('model_type'); + $table->unsignedBigInteger($columnNames['model_morph_key']); + $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_permissions_id_model_type_index'); + + $table->foreign(AclRegistrar::$pivotPermission) + ->references('id') + ->on($permissionsTable) + ->cascadeOnDelete(); + + if ($teams) { + $table->unsignedBigInteger($columnNames['team_foreign_key']); + $table->index($columnNames['team_foreign_key'], 'model_has_permissions_team_foreign_key_index'); + + $table->primary([$columnNames['team_foreign_key'], AclRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'], + 'model_has_permissions_permission_model_type_primary'); + } else { + $table->primary([AclRegistrar::$pivotPermission, $columnNames['model_morph_key'], 'model_type'], + 'model_has_permissions_permission_model_type_primary'); + } + }); + } + + public function down() + { + $modelHasPermissionTable = config('acl.tables.model_has_permissions', 'model_has_permissions'); + Schema::dropIfExists($modelHasPermissionTable); + } +} diff --git a/database/migrations/2023_04_06_150649_create_model_has_groups_table.php b/database/migrations/2023_04_06_150649_create_model_has_groups_table.php new file mode 100644 index 0000000..601ee37 --- /dev/null +++ b/database/migrations/2023_04_06_150649_create_model_has_groups_table.php @@ -0,0 +1,47 @@ +unsignedBigInteger(AclRegistrar::$pivotGroup); + + $table->string('model_type'); + $table->unsignedBigInteger($columnNames['model_morph_key']); + $table->index([$columnNames['model_morph_key'], 'model_type'], 'model_has_groups_model_id_model_type_index'); + + $table->foreign(AclRegistrar::$pivotGroup) + ->references('id') + ->on($groupsTable) + ->cascadeOnDelete(); + + if ($teams) { + $table->unsignedBigInteger($columnNames['team_foreign_key']); + $table->index($columnNames['team_foreign_key'], 'model_has_groups_team_foreign_key_index'); + + $table->primary([$columnNames['team_foreign_key'], AclRegistrar::$pivotGroup, $columnNames['model_morph_key'], 'model_type'], + 'model_has_groups_group_model_type_primary'); + } else { + $table->primary([AclRegistrar::$pivotGroup, $columnNames['model_morph_key'], 'model_type'], + 'model_has_groups_group_model_type_primary'); + } + }); + } + + public function down() + { + $modelHasGroupsTable = config('acl.tables.model_has_groups', 'model_has_groups'); + Schema::dropIfExists($modelHasGroupsTable); + } +} diff --git a/database/migrations/2023_04_06_150651_create_group_has_permissions_table.php b/database/migrations/2023_04_06_150651_create_group_has_permissions_table.php new file mode 100644 index 0000000..ca45663 --- /dev/null +++ b/database/migrations/2023_04_06_150651_create_group_has_permissions_table.php @@ -0,0 +1,40 @@ +unsignedBigInteger(AclRegistrar::$pivotPermission); + $table->unsignedBigInteger(AclRegistrar::$pivotGroup); + + $table->foreign(AclRegistrar::$pivotPermission) + ->references('id') + ->on($permissionsTable) + ->cascadeOnDelete(); + + $table->foreign(AclRegistrar::$pivotGroup) + ->references('id') + ->on($groupsTable) + ->cascadeOnDelete(); + + $table->primary([AclRegistrar::$pivotPermission, AclRegistrar::$pivotGroup], 'group_has_permission_permission_id_group_id_primary'); + }); + } + + public function down() + { + $groupHasPermissionsTable = config('acl.tables.group_has_permissions', 'group_has_permissions'); + + Schema::dropIfExists($groupHasPermissionsTable); + } +} diff --git a/resources/lang/vendor/acl/de/acl.php b/resources/lang/vendor/acl/de/acl.php new file mode 100644 index 0000000..95a2f63 --- /dev/null +++ b/resources/lang/vendor/acl/de/acl.php @@ -0,0 +1,18 @@ + 'Dieser Benutzer verfügt nicht über die erforderlichen Gruppen, um auf diese Route zuzugreifen.', + 'forPermissions' => 'Dieser Benutzer verfügt nicht über die erforderlichen Berechtigungen, um auf diese Route zuzugreifen', + 'notLoggedIn' => 'Sie sind nicht angemeldet', + 'forGroupsOrPermissions' => 'Sie haben keine Berechtigungen, um auf diese Route zuzugreifen', + 'permission_already_exists' => 'Eine Genehmigung mit dieser Schnecke existiert bereits!', + 'group_already_exists' => 'Eine Gruppe mit diesem Slug oder Namen existiert bereits!', + 'permission_does_not_exist' => 'Es gibt keine Erlaubnis mit dieser ID:', + 'permission_does_not_exist_with_slug' => 'Es gibt keine Erlaubnis für diesen Slug:', + 'group_does_not_exist' => 'Es gibt keine Gruppe mit dieser ID:', + 'group_does_not_exist_with_slug' => 'Es gibt keine Gruppe mit dieser Schnecke:', + 'user_does_not_exist_with_name' => 'Es gibt keinen Benutzer mit diesem Namen:', + 'user_does_not_exist' => 'Es gibt keinen Benutzer mit dieser ID:', + 'null_model' => 'Sie verwenden ein Nullmodell als Parameter.', + 'ignition_not_installed' => 'Die Zündung ist nicht installiert, bitte installieren, um Lösungen zu verwenden. composer require --dev facade/ignition', + ]; diff --git a/resources/lang/vendor/acl/en/acl.php b/resources/lang/vendor/acl/en/acl.php new file mode 100644 index 0000000..0cb9202 --- /dev/null +++ b/resources/lang/vendor/acl/en/acl.php @@ -0,0 +1,18 @@ + 'This user does not have the necessary groups to access this route.', + 'forPermissions' => 'This user does not have the necessary permissions to access this route', + 'notLoggedIn' => 'You are not logged in.', + 'forGroupsOrPermissions' => 'You do not have any of the permissions required to access this route', + 'permission_already_exists' => 'One permission with this slug already exists!', + 'group_already_exists' => 'One group with this slug or name already exists!', + 'permission_does_not_exist' => 'There is no permission with this id:', + 'permission_does_not_exist_with_slug' => 'There is no permission with this slug:', + 'group_does_not_exist' => 'There is no group with this Id:', + 'group_does_not_exist_with_slug' => 'There is no group with this slug:', + 'user_does_not_exist_with_name' => 'There is no user with this name:', + 'user_does_not_exist' => 'There is no user with this id:', + 'null_model' => 'You are passing a null model as parameter', + 'ignition_not_installed' => 'Ignition is not installed, please install to use solutions. composer require --dev facade/ignition', + ]; diff --git a/resources/lang/vendor/acl/es/acl.php b/resources/lang/vendor/acl/es/acl.php new file mode 100644 index 0000000..110a449 --- /dev/null +++ b/resources/lang/vendor/acl/es/acl.php @@ -0,0 +1,18 @@ + 'No perteneces a ningún grupo con los permisos necesarios para acceder a esta ruta.', + 'forPermissions' => 'No tienes los permisos necesarios para acceder a esta ruta', + 'notLoggedIn' => 'No has iniciado sesión.', + 'forGroupsOrPermissions' => 'No tiene ninguno de los permisos necesarios para acceder a esta ruta', + 'permission_already_exists' => '¡Ya existe un permiso con esta slug o nombre!', + 'group_already_exists' => '¡Ya existe un grupo con esta slug o nombre!', + 'permission_does_not_exist' => 'No hay permiso con esta Id:', + 'permission_does_not_exist_with_slug' => 'No hay permiso con este slug:', + 'group_does_not_exist' => 'No hay grupo con esta Id:', + 'group_does_not_exist_with_slug' => 'No hay grupo con este slug:', + 'user_does_not_exist_with_name' => 'No hay usuario con este nombre:', + 'user_does_not_exist' => 'No hay usuario con esta Id:', + 'null_model' => 'Está pasando un modelo nulo como parámetro', + 'ignition_not_installed' => 'Ignition no está instalado, por favor instalar para utilizar solutions. composer require --dev facade/ignition', + ]; diff --git a/resources/lang/vendor/acl/fr/acl.php b/resources/lang/vendor/acl/fr/acl.php new file mode 100644 index 0000000..776b5bc --- /dev/null +++ b/resources/lang/vendor/acl/fr/acl.php @@ -0,0 +1,18 @@ + 'Cet utilisateur ne dispose pas des groupes nécessaires pour accéder à cet itinéraire.', + 'forPermissions' => 'Cet utilisateur ne dispose pas des autorisations nécessaires pour accéder à cette route.', + 'notLoggedIn' => "Vous n'êtes pas connecté", + 'forGroupsOrPermissions' => "Vous ne disposez d'aucune des autorisations requises pour accéder à cette route", + 'permission_already_exists' => 'Un permis avec cette limace existe déjà!', + 'group_already_exists' => 'Un groupe avec cette limace ou ce nom existe déjà!', + 'permission_does_not_exist' => "Il n'y a pas de permission avec cet identifiant:", + 'permission_does_not_exist_with_slug' => "Il n'y a pas d'autorisation avec cette limace:", + 'group_does_not_exist' => "Il n'y a pas de groupe avec cet identifiant:", + 'group_does_not_exist_with_slug' => "Il n'y a pas de groupe avec cette limace:", + 'user_does_not_exist_with_name' => "Il n'y a pas d'utilisateur avec ce nom:", + 'user_does_not_exist' => "Il n'y a pas d'utilisateur avec cet identifiant:", + 'null_model' => 'Vous utilisez un modèle null en tant que paramètre.', + 'ignition_not_installed' => "L'allumage n'est pas installé, veuillez l'installer pour utiliser les solutions. composer require --dev facade/ignition", + ]; diff --git a/resources/lang/vendor/acl/it/acl.php b/resources/lang/vendor/acl/it/acl.php new file mode 100644 index 0000000..2132431 --- /dev/null +++ b/resources/lang/vendor/acl/it/acl.php @@ -0,0 +1,18 @@ + 'Questo utente non ha i gruppi necessari per accedere a questa rotta.', + 'forPermissions' => 'Questo utente non ha le autorizzazioni necessarie per accedere a questa rotta', + 'notLoggedIn' => 'Non sei loggato.', + 'forGroupsOrPermissions' => 'Non hai nessuna delle autorizzazioni richieste per accedere a questa rotta', + 'permission_already_exists' => 'Esiste già un permesso con questo proiettile!', + 'group_already_exists' => 'Esiste già un gruppo con questo slug o nome!', + 'permission_does_not_exist' => 'Non ci sono permessi con questo ID:', + 'permission_does_not_exist_with_slug' => "Non c'è autorizzazione con questo slug:", + 'group_does_not_exist' => "Non c'è gruppo con questo ID:", + 'group_does_not_exist_with_slug' => "Non c'è gruppo con questo slug:", + 'user_does_not_exist_with_name' => "Non c'è nessun utente con questo nome:", + 'user_does_not_exist' => 'Non ci sono utenti con questo ID:', + 'null_model' => 'Si sta utilizzando un modello null come parametro.', + 'ignition_not_installed' => "L'accensione non è installata, installare per utilizzare le soluzioni. composer require --dev facade/ignition", + ]; diff --git a/resources/lang/vendor/acl/pt-br/acl.php b/resources/lang/vendor/acl/pt-br/acl.php new file mode 100644 index 0000000..c2ab66d --- /dev/null +++ b/resources/lang/vendor/acl/pt-br/acl.php @@ -0,0 +1,18 @@ + 'Este usuário não possui os grupos necessários para acessar esta rota.', + 'forPermissions' => 'Este usuário não possui as permissões necessárias para acessar esta rota', + 'notLoggedIn' => 'Você não está logado no sistema.', + 'forGroupsOrPermissions' => 'Você não possui nenhuma das permissões necessárias para acessar esta rota', + 'permission_already_exists' => 'Uma permissão com este slug já existe!', + 'group_already_exists' => 'Um grupo com este slug ou nome já existe!', + 'permission_does_not_exist' => 'Não existe nenhuma permissão com esse id:', + 'permission_does_not_exist_with_slug' => 'Não existe nenhuma permissão com esse slug:', + 'group_does_not_exist' => 'Não existe nenhum grupo com esse Id:', + 'group_does_not_exist_with_slug' => 'Não existe nenhum groupo com esse slug:', + 'user_does_not_exist_with_name' => 'Não existe nenhum usuário com este nome:', + 'user_does_not_exist' => 'Não existe nenhum usuário com este id:', + 'null_model' => 'Você está usando um model nulo como parâmetro.', + 'ignition_not_installed' => 'A ignição não está instalada, instale para usar soluções. composer require --dev facade/ignition', + ]; diff --git a/resources/lang/vendor/acl/ru/acl.php b/resources/lang/vendor/acl/ru/acl.php new file mode 100644 index 0000000..8d42ec9 --- /dev/null +++ b/resources/lang/vendor/acl/ru/acl.php @@ -0,0 +1,18 @@ + 'У этого пользователя нет необходимых групп для доступа к этому маршруту.', + 'forPermissions' => 'У этого пользователя нет необходимых прав доступа к этому маршруту.', + 'notLoggedIn' => 'Вы не авторизованы.', + 'forGroupsOrPermissions' => 'У вас нет каких-либо разрешений, необходимых для доступа к этому маршруту', + 'permission_already_exists' => 'Разрешение с этим слагом уже существует!', + 'group_already_exists' => 'Группа с этим слагом или именем уже существует!', + 'permission_does_not_exist' => 'Нет разрешения с этим идентификатором:', + 'permission_does_not_exist_with_slug' => 'Нет разрешения с этим слагом:', + 'group_does_not_exist' => 'Нет группы с таким идентификатором:', + 'group_does_not_exist_with_slug' => 'Нет группы с этим слизнем:', + 'user_does_not_exist_with_name' => 'Нет пользователя с таким именем:', + 'user_does_not_exist' => 'Нет пользователя с таким идентификатором:', + 'null_model' => 'Вы используете нулевую модель в качестве параметра.', + 'ignition_not_installed' => 'Зажигание не установлено, пожалуйста, установите, чтобы использовать решения. composer require --dev facade/ignition', + ]; diff --git a/resources/views/vendor/junges/acl/_forms/groups/group.blade.php b/resources/views/vendor/junges/acl/_forms/groups/group.blade.php new file mode 100644 index 0000000..9da1e1a --- /dev/null +++ b/resources/views/vendor/junges/acl/_forms/groups/group.blade.php @@ -0,0 +1,73 @@ + +
+ + + @if($errors->has('name')) + {{ $errors->first('name') }} + @endif +
+
+ + + @if($errors->has('slug')) + {{ $errors->first('slug') }} + @endif +
+ +
+ + @if($errors->has('description')) + {{ $errors->first('description') }} + @endif +
+
+ + + @if($errors->has('permissions')) + {{ $errors->first('permissions') }} + @endif +
\ No newline at end of file diff --git a/resources/views/vendor/junges/acl/_forms/users/add-group.blade.php b/resources/views/vendor/junges/acl/_forms/users/add-group.blade.php new file mode 100644 index 0000000..d2ed386 --- /dev/null +++ b/resources/views/vendor/junges/acl/_forms/users/add-group.blade.php @@ -0,0 +1,56 @@ +
+ + + @if($errors->has('users')) + {{ $errors->first('users') }} + @endif +
+
+ + +
diff --git a/resources/views/vendor/junges/acl/_forms/users/add-permission.blade.php b/resources/views/vendor/junges/acl/_forms/users/add-permission.blade.php new file mode 100644 index 0000000..7339274 --- /dev/null +++ b/resources/views/vendor/junges/acl/_forms/users/add-permission.blade.php @@ -0,0 +1,59 @@ +@csrf +
+ + + @if($errors->has('user')) + {{ $errors->first('user') }} + @endif +
+
+ + + @if($errors->has('permissions')) + {{ $errors->first('permissions') }} +@endif \ No newline at end of file