mirror of
https://github.com/openvk/chandler.git
synced 2025-04-02 22:41:51 +03:00
11 lines
No EOL
266 B
PHP
11 lines
No EOL
266 B
PHP
<?php declare(strict_types=1);
|
|
use Chandler\Security\Authenticator;
|
|
|
|
return (function(): ?bool
|
|
{
|
|
$auth = Authenticator::i();
|
|
$user = $auth->getUser();
|
|
if(!$user) return NULL;
|
|
|
|
return $user->can("access")->model("admin")->whichBelongsTo(NULL);
|
|
}); |