Skip to content

普通用户可以删除不可见的管理员信息 #518

@yanzhou-felicity

Description

@yanzhou-felicity

管理员角色对普通用户是不可见的,但是普通用户可以通过id来删除管理员的角色信息,以下展示了普通用户请求url:http://localhost:8080/jeesite/a/sys/user/delete?id=2 删除id为2的管理员的角色信息
The administrator role is not visible to regular users, but regular users can still delete the administrator's role information by using the 'id'. The following shows an example of a regular user requesting the URL: http://localhost:8080/jeesite/a/sys/user/delete?id=2 to delete the role information of the administrator with ID 2.

问题代码出现在com.thinkgem.jeesite.modules.sys.web.UserController类中的delete函数
The issue code is present in the 'delete' function of the 'UserController' class in com.thinkgem.jeesite.modules.sys.web.

管理员可见的
Visible to administrators.
299f56c54c374e227621c66f4ae67137

发送请求尝试删除山东省总公司的id为2,用户名为sd_admin的
Attempting to delete the record with ID 2 and username "sd_admin" for the Shandong Provincial Headquarters by sending a request.
dbb386c4bab1e0032ebba21295dcf6eb

删除成功
Deletion successful.
3031c968dedb560a5ed8580ee9b38277

登录管理员查看登录名为ad_admin的角色已经被删除
After logging in as an administrator, it is noticed that the role with the login name "ad_admin" has been deleted.
ef00daf824a159e25f2701cba28ce499

问题代码
The problematic code.
77d44bfc5637b324d468859ae1206fad

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions