2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 19:37:18 +08:00
Files
panel/app/Http/FilesACLRepository.php
2022-11-17 00:18:56 +08:00

37 lines
695 B
PHP

<?php
namespace App\Http;
use Alexusmai\LaravelFileManager\Services\ACLService\ACLRepository;
class FilesACLRepository implements ACLRepository
{
/**
* Get user ID
*
* @return mixed
*/
public function getUserID()
{
return auth('sanctum')->id();
}
/**
* Get ACL rules list for user
*
* @return array
*/
public function getRules(): array
{
if (auth('sanctum')->check()) {
return [
['disk' => 'www', 'path' => '*', 'access' => 2],
];
} else {
return [
['disk' => 'www', 'path' => '*', 'access' => 0],
];
}
}
}