切换导航条
此项目
正在载入...
登录
何书鹏
/
recruit
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
Karson
5 years ago
提交者
Gitee
5 years ago
提交
887a381ff3bf58cf70c56d2e431e55a5eccbe33d
2 个父辈
054e75a9
c14adbbd
!159 权限节点安全性调整
Merge pull request !159 from MrCai/master
隐藏空白字符变更
内嵌
并排对比
正在显示
4 个修改的文件
包含
9 行增加
和
3 行删除
application/admin/command/Install/fastadmin.sql
application/admin/controller/Addon.php
application/admin/controller/auth/Rule.php
application/admin/lang/zh-cn.php
application/admin/command/Install/fastadmin.sql
查看文件 @
887a381
...
...
@@ -219,10 +219,8 @@ INSERT INTO `fa_auth_rule` VALUES (55, 'file', 4, 'addon/index', 'View', 'fa fa-
INSERT
INTO
`fa_auth_rule`
VALUES
(
56
,
'file'
,
4
,
'addon/add'
,
'Add'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
57
,
'file'
,
4
,
'addon/edit'
,
'Edit'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
58
,
'file'
,
4
,
'addon/del'
,
'Delete'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
59
,
'file'
,
4
,
'addon/
local'
,
'Local install
'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
59
,
'file'
,
4
,
'addon/
downloaded'
,
'Local addon
'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
60
,
'file'
,
4
,
'addon/state'
,
'Update state'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
61
,
'file'
,
4
,
'addon/install'
,
'Install'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
62
,
'file'
,
4
,
'addon/uninstall'
,
'Uninstall'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
63
,
'file'
,
4
,
'addon/config'
,
'Setting'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
64
,
'file'
,
4
,
'addon/refresh'
,
'Refresh'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
INSERT
INTO
`fa_auth_rule`
VALUES
(
65
,
'file'
,
4
,
'addon/multi'
,
'Multi'
,
'fa fa-circle-o'
,
''
,
''
,
0
,
1502035509
,
1502035509
,
0
,
'normal'
);
...
...
application/admin/controller/Addon.php
查看文件 @
887a381
...
...
@@ -23,6 +23,9 @@ class Addon extends Backend
public
function
_initialize
()
{
parent
::
_initialize
();
if
(
!
$this
->
auth
->
isSuperAdmin
()
&&
in_array
(
$this
->
request
->
action
(),
[
'install'
,
'uninstall'
,
'local'
,
'upgrade'
]))
{
$this
->
error
(
__
(
'Access is allowed only to the super management group'
));
}
}
/**
...
...
application/admin/controller/auth/Rule.php
查看文件 @
887a381
...
...
@@ -26,6 +26,9 @@ class Rule extends Backend
public
function
_initialize
()
{
parent
::
_initialize
();
if
(
!
$this
->
auth
->
isSuperAdmin
()){
$this
->
error
(
__
(
'Access is allowed only to the super management group'
));
}
$this
->
model
=
model
(
'AuthRule'
);
// 必须将结果集转换为数组
$ruleList
=
collection
(
$this
->
model
->
order
(
'weigh'
,
'desc'
)
->
order
(
'id'
,
'asc'
)
->
select
())
->
toArray
();
...
...
application/admin/lang/zh-cn.php
查看文件 @
887a381
...
...
@@ -180,4 +180,6 @@ return [
'Admin log tips'
=>
'管理员可以查看自己所拥有的权限的管理员日志'
,
'Group tips'
=>
'角色组可以有多个,角色有上下级层级关系,如果子角色有角色组和管理员的权限则可以派生属于自己组别的下级角色组或管理员'
,
'Rule tips'
=>
'规则通常对应一个控制器的方法,同时左侧的菜单栏数据也从规则中体现,通常建议通过命令行进行生成规则节点'
,
'Access is allowed only to the super management group'
=>
'仅超级管理组能访问'
,
'Local addon'
=>
'本地插件'
,
];
...
...
请
注册
或
登录
后发表评论