PHP Class TinyAuth\Auth\TinyAuthorize

Only one config file acl.ini necessary, doesn't even need a Roles Table / roles table. Uses most persistent _cake_core_ cache by default.
Inheritance: extends Cake\Auth\BaseAuthorize, use trait AclTrait
Afficher le fichier Open project: dereuromark/cakephp-tinyauth Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Cake\Controller\ComponentRegistry $registry, array $config = [] )
authorize ( array $user, Cake\Network\Request $request ) : boolean Authorizes a user using the AclComponent.

Method Details

__construct() public méthode

public __construct ( Cake\Controller\ComponentRegistry $registry, array $config = [] )
$registry Cake\Controller\ComponentRegistry
$config array

authorize() public méthode

Allows single or multi role based authorization Examples: - User HABTM Roles (Role array in User array) - User belongsTo Roles (role_id in User array)
public authorize ( array $user, Cake\Network\Request $request ) : boolean
$user array The user to authorize
$request Cake\Network\Request The request needing authorization.
Résultat boolean Success