mirror of
https://git.proxmox.com/git/pve-access-control
synced 2025-08-02 23:41:23 +00:00
fix #2575: die when trying to edit built-in roles
instead of silently ignoring the change Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
23059f3572
commit
deb63acf3f
@ -126,11 +126,14 @@ __PACKAGE__->register_method ({
|
||||
code => sub {
|
||||
my ($param) = @_;
|
||||
|
||||
my $role = $param->{roleid};
|
||||
|
||||
die "auto-generated role '$role' cannot be modified\n"
|
||||
if PVE::AccessControl::role_is_special($role);
|
||||
|
||||
PVE::AccessControl::lock_user_config(
|
||||
sub {
|
||||
|
||||
my $role = $param->{roleid};
|
||||
|
||||
my $usercfg = cfs_read_file("user.cfg");
|
||||
|
||||
die "role '$role' does not exist\n"
|
||||
|
Loading…
Reference in New Issue
Block a user