186 Star 341 Fork 135

wjggwm/webside

 / 详情

超级管理员的防删除控制有缺陷

Done
Opened this issue  
2016-09-21 14:42
        delModel : function(nav, callback) {
            var rows = grid.getCheckedRecords();
            if (rows.length == 1) {
                if (nav == '/user/deleteBatch.html') {
                    if (rows[0].role.name == '超级管理员') {
                        layer.msg('该用户为超级管理员,不能删除!', {
                            icon : 0
                        });
                        return false;
                    }
                }
                if (nav == '/role/deleteBatch.html') {
                    if (rows[0].name == '超级管理员') {
                        layer.msg('该角色为基础角色,不能删除!', {
                            icon : 0
                        });
                        return false;
                    }
                }

在角色管理画面中角色名是可以变更的,应该禁止变更超级管理员角色名,或者强制超管角色的ID为0并禁止删除ID为0的角色或用户。

Comments (2)

已修正为使用key进行标识,并添加角色“超级管理员”禁止编辑、删除措施,确保系统安全

Status changed to closed

wjggwm approved 任务

Sign in to comment

Status
Assignees
Milestones
Pull Requests
Successfully merging a pull request will close this issue.
Branches
Planed to start   -   Planed to end
-
Top level
Priority
参与者(2)
413659 wjggwm 1578923123
Java
1
https://gitee.com/wjggwm/webside.git
git@gitee.com:wjggwm/webside.git
wjggwm
webside
webside

Search

344bd9b3 5694891 D2dac590 5694891