-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from dotkernel/issue-26
Issue #26: Added support for `laminas/laminas-servicemanager:4.x`
- Loading branch information
Showing
21 changed files
with
320 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"ignore_php_platform_requirements": { | ||
"8.4": true | ||
}, | ||
"backwardCompatibilityCheck": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
{ | ||
"name": "dotkernel/dot-rbac", | ||
"type": "library", | ||
"description": "DotKernel RBAC authorization component", | ||
"description": "Dotkernel RBAC authorization component", | ||
"license": "MIT", | ||
"homepage": "https://github.com/dotkernel/dot-rbac", | ||
"keywords": [ | ||
"authorization", | ||
"laminas", | ||
"mezzio", | ||
"rbac" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "DotKernel Team", | ||
"name": "Dotkernel Team", | ||
"email": "[email protected]" | ||
} | ||
], | ||
|
@@ -22,16 +22,16 @@ | |
} | ||
}, | ||
"require": { | ||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0", | ||
"laminas/laminas-servicemanager": "^3.11", | ||
"dotkernel/dot-authorization": "^3.4.1", | ||
"laminas/laminas-stdlib": "^3.7", | ||
"laminas/laminas-authentication": "2.16.0" | ||
"php": "~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0", | ||
"dotkernel/dot-authorization": "^3.6.0", | ||
"laminas/laminas-authentication": "^2.16.0", | ||
"laminas/laminas-servicemanager": "^4.0", | ||
"laminas/laminas-stdlib": "^3.7" | ||
}, | ||
"require-dev": { | ||
"laminas/laminas-coding-standard": "^3.0", | ||
"phpunit/phpunit": "^10.2", | ||
"vimeo/psalm": "^5.13", | ||
"laminas/laminas-coding-standard": "^2.5" | ||
"vimeo/psalm": "^5.13" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
|
@@ -46,7 +46,8 @@ | |
"scripts": { | ||
"check": [ | ||
"@cs-check", | ||
"@test" | ||
"@test", | ||
"@static-analysis" | ||
], | ||
"cs-check": "phpcs", | ||
"cs-fix": "phpcbf", | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# Installation | ||
|
||
Run the following command in your project root directory | ||
Run the following command in your project root directory: | ||
|
||
composer require dotkernel/dot-rbac | ||
```shell | ||
composer require dotkernel/dot-rbac | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Configuration | ||
|
||
Even if the authorization service can be programmatically configured, we recommend using the configuration based approach. | ||
We further describe how to configure the module, using the configuration file. | ||
|
||
First of all, you should enable the module in your application by merging this package's `ConfigProvider` with your application's config. | ||
This ensures that all dependencies required by this module are registered in the service manager. | ||
It also defines default config values for this module. | ||
|
||
Create a configuration file in your `config/autoload` folder and change the module options as needed. | ||
|
||
## authorization.global.php | ||
|
||
```php | ||
'dot_authorization' => [ | ||
//name of the guest role to use if no identity is provided | ||
'guest_role' => 'guest', | ||
|
||
'role_provider_manager' => [], | ||
|
||
//example for a flat RBAC model using the InMemoryRoleProvider | ||
'role_provider' => [ | ||
'type' => 'InMemory', | ||
'options' => [ | ||
'roles' => [ | ||
'admin' => [ | ||
'permissions' => [ | ||
'edit', | ||
'delete', | ||
//etc.. | ||
] | ||
], | ||
'user' => [ | ||
'permissions' => [ | ||
//... | ||
] | ||
] | ||
] | ||
], | ||
], | ||
|
||
//example for a hierarchical model, less to write but it can be confusing sometimes | ||
/*'role_provider' => [ | ||
'type' => 'InMemory', | ||
'options' => [ | ||
'roles' => [ | ||
'admin' => [ | ||
'children' => ['user'], | ||
'permissions' => ['create', 'delete'] | ||
], | ||
'user' => [ | ||
'children' => ['guest'] | ||
'permissions' => ['edit'] | ||
] | ||
'guest' => [ | ||
'permissions' => ['view'] | ||
] | ||
] | ||
] | ||
],*/ | ||
|
||
'assertion_manager' => [ | ||
'factories' => [ | ||
//EditAssertion::class => InvokableFactory::class, | ||
], | ||
], | ||
|
||
'assertions' => [ | ||
[ | ||
'type' => EditAssertion::class, | ||
'permissions' => ['edit'], | ||
'options' => [] | ||
] | ||
] | ||
] | ||
``` |
Oops, something went wrong.