save
This commit is contained in:
parent
1cf3572900
commit
f4d6d6d2f4
@ -120,7 +120,7 @@ class AdminRuleController extends Crud
|
||||
$keys = AdminRule::where('key', 'like', "$controller_search%")
|
||||
->whereIn('id', $rules)->pluck('key');
|
||||
$permissions = [];
|
||||
$prefix_length = strlen($controller);
|
||||
$prefix_length = strlen($controller) + 1;
|
||||
foreach ($keys as $key) {
|
||||
if ($key === $controller) {
|
||||
$permissions = ['*'];
|
||||
|
@ -36,9 +36,7 @@ function toggleSearchFormShow()
|
||||
* 获取控制器详细权限,并决定展示哪些按钮或dom元素
|
||||
*/
|
||||
layui.$(function () {
|
||||
console.trace();
|
||||
console.log(CONTROLLER);
|
||||
//if (!window.CONTROLLER) return;
|
||||
if (typeof CONTROLLER === "undefined") return;
|
||||
let $ = layui.$;
|
||||
$.ajax({
|
||||
url: "/app/admin/admin-rule/permission",
|
||||
|
Loading…
Reference in New Issue
Block a user