Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 41 additions & 57 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions config/asseco-authorization.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@
* Model bindings.
*/
'models' => [
'authorizable_model' => AuthorizableModel::class,
'authorizable_model' => AuthorizableModel::class,
'authorizable_set_type' => AuthorizableSetType::class,
'authorization_rule' => AuthorizationRule::class,
'authorization_rule' => AuthorizationRule::class,
],

'migrations' => [
'migrations' => [

/**
* UUIDs as primary keys.
*/
'uuid' => false,
'uuid' => false,

/**
* Timestamp types.
Expand All @@ -35,7 +35,7 @@
* Should the package run the migrations. Set to false if you're publishing
* and changing default migrations.
*/
'run' => true,
'run' => true,
],

/**
Expand All @@ -44,20 +44,20 @@
* This does not recurse in folders, so you need to specify
* an array of paths if non-standard models are to be used
*/
'models_path' => [
'models_path' => [
app_path('Models') => 'App\\Models\\',
],

/**
* Namespace to Authorizable trait.
*/
'trait_path' => Authorizable::class,
'trait_path' => Authorizable::class,

/**
* List of roles/groups/etc which have absolute admin/root rights.
* Key must resemble names from authorization_manage_types table.
*/
'absolute_rights' => [
'absolute_rights' => [
// 'roles' => [
// 'asseco-voice-admin'
// ],
Expand All @@ -76,5 +76,5 @@
* your auth service (or whoever is responsible for providing user roles). Check readme
* for more details.
*/
'virtual_role' => env('VIRTUAL_ROLE', 'voice-all-mighty'),
'virtual_role' => env('VIRTUAL_ROLE', 'voice-all-mighty'),
];
4 changes: 2 additions & 2 deletions src/App/Models/AuthorizationRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ public static function format($authorizableSetTypeId, string $authorizableSetVal
{
return [
self::SET_TYPE_ID => $authorizableSetTypeId,
self::SET_VALUE => $authorizableSetValue,
self::RULES => $rules,
self::SET_VALUE => $authorizableSetValue,
self::RULES => $rules,
];
}
}
2 changes: 1 addition & 1 deletion src/Database/Factories/AuthorizableModelFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public function modelName()
public function definition()
{
return [
'name' => $this->faker->word,
'name' => $this->faker->word,
'created_at' => now(),
'updated_at' => now(),
];
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Factories/AuthorizableSetTypeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ public function modelName()
public function definition()
{
return [
'name' => $this->faker->word,
'name' => $this->faker->word,
'description' => $this->faker->sentence,
'created_at' => now(),
'updated_at' => now(),
'created_at' => now(),
'updated_at' => now(),
];
}
}
10 changes: 5 additions & 5 deletions src/Database/Factories/AuthorizationRuleFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public function definition()
{
return [
'authorizable_set_type_id' => $this->faker->randomNumber(),
'authorizable_set_value' => $this->faker->word,
'authorizable_model_id' => $this->faker->randomNumber(),
'rules' => json_encode($this->faker->words(10)),
'created_at' => now(),
'updated_at' => now(),
'authorizable_set_value' => $this->faker->word,
'authorizable_model_id' => $this->faker->randomNumber(),
'rules' => json_encode($this->faker->words(10)),
'created_at' => now(),
'updated_at' => now(),
];
}
}
Loading
Loading