This repository has been archived on 2024-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
yoshop/source/application/store/common.php
2020-04-25 22:20:29 +08:00

21 lines
381 B
PHP

<?php
// 应用公共函数库文件
use app\store\service\Auth;
/**
* 验证指定url是否有访问权限
* @param string|array $url
* @param bool $strict 严格模式
* @return bool
*/
function checkPrivilege($url, $strict = true)
{
try {
return Auth::getInstance()->checkPrivilege($url, $strict);
} catch (\Exception $e) {
return false;
}
}