alex-kalanis / kw_auth_groups
Groups for determine authentication rights in KWCMS
Requires
- php: >=7.4.0
- ext-ctype: *
- ext-json: *
- ext-mbstring: *
- alex-kalanis/kw_accounts: >=3.0 <4
- alex-kalanis/kw_auth_sources: >=5.0 <6
- alex-kalanis/kw_groups: >=3.0 <4
Requires (Dev)
- alex-kalanis/kw_locks: >=3.0 <4
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^1.0
- phpstan/phpstan-phpunit: ^1.0
- phpunit/phpunit: >=8.0 <=9
- shipmonk/composer-dependency-analyser: ^1.4
This package is auto-updated.
Last update: 2024-12-07 21:22:53 UTC
README
Groups using kw_* authentication sources inside the kw_* project.
PHP Installation
composer.phar require alex-kalanis/kw_auth_groups
(Refer to Composer Documentation if you are not familiar with composer)
PHP Usage
1.) Use your autoloader (if not already done via Composer autoloader)
2.) Add some external packages with connection to the local or remote services.
3.) Connect the "kalanis\kw_auth_groups\Access\Factory" into your app. Extends it for setting your case.
4.) Extend your libraries by interfaces inside the package.
5.) Just call Factory::getSources and then work over CompositeSources.
Basic Rules
-
Get
- Group ID equals current one.
- Group ID is somewhere in the tree of children.
-
Add
- Fails when the currently added group already exists.
- Fails when the currently added group is already defined within parents of this group.
-
Update
- Fails when the currently updated group is already defined within parents of this group.
-
Delete
- Can delete only when there is no group with processed one as parent.
The group ID is usually string, although it can be integer converted to string before method call.