alex-kalanis/kw_auth_groups

Groups for determine authentication rights in KWCMS

v4.0.0 2024-04-07 19:55 UTC

This package is auto-updated.

Last update: 2024-04-07 19:57:39 UTC


README

Build Status Scrutinizer Code Quality Latest Stable Version Minimum PHP Version Downloads License Code Coverage

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.