jield-webdev/jield-authorize

Small helper module to integrate BjyAuthorize (the kokspflanze/bjy-authorize fork) with dynamic assertions, which cannot be serialized

v1.0 2022-10-26 10:59 UTC

This package is auto-updated.

Last update: 2024-04-18 13:44:17 UTC


README

Small helper module to integrate BjyAuthorize (the kokspflanze/bjy-authorize fork) with dynamic assertions, which cannot be serialized

Default config file

The access_service has to implement AccessRolesByUser interface and permit_service the HasPermitInterface the User class has to implement UserAsRoleInterface and the role class RoleInterface

Make sure that 'BjyAuthorize' is enabled before 'Jield\Authorize' in module.config

namespace BjyAuthorize;

use Admin\Entity\Role;
use Admin\Service\UserService;

return [
    'jield_authorize' => [
        'default_role'       => Role::ROLE_PUBLIC,
        'authenticated_role' => Role::ROLE_USER,
        'access_service'     => UserService::class,
        'permit_service'     => UserService::class,
        'cache_enabled'      => false,
        'role_entity_class'  => Role::class,
    ],
];