Removed a stupid permission check
This commit is contained in:
parent
92fcfbecca
commit
bebcb9bfb2
@ -402,11 +402,6 @@ command_result ConnectedClient::handleCommandServerGroupAddClient(Command &cmd)
|
||||
return command_result{error::client_invalid_id, "invalid cldbid"};
|
||||
}
|
||||
|
||||
ClientPermissionCalculator client_permissions{target_server, target_cldbid, ClientType::CLIENT_TEAMSPEAK, 0};
|
||||
if(!permission::v2::permission_granted(client_permissions.calculate_permission(permission::i_client_needed_permission_modify_power).zero_if_unset(), this->calculate_permission(permission::i_client_permission_modify_power, 0))) {
|
||||
return command_result{permission::i_client_needed_permission_modify_power};
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<groups::ServerGroup>> added_groups{};
|
||||
added_groups.reserve(cmd.bulkCount());
|
||||
|
||||
@ -526,11 +521,6 @@ command_result ConnectedClient::handleCommandServerGroupDelClient(Command &cmd)
|
||||
return command_result{error::client_invalid_id, "invalid cldbid"};
|
||||
}
|
||||
|
||||
ClientPermissionCalculator client_permissions{target_server, target_cldbid, ClientType::CLIENT_TEAMSPEAK, 0};
|
||||
if(!permission::v2::permission_granted(client_permissions.calculate_permission(permission::i_client_needed_permission_modify_power).zero_if_unset(), this->calculate_permission(permission::i_client_permission_modify_power, 0))) {
|
||||
return command_result{permission::i_client_needed_permission_modify_power};
|
||||
}
|
||||
|
||||
std::vector<std::shared_ptr<groups::ServerGroup>> removed_groups{};
|
||||
removed_groups.reserve(cmd.bulkCount());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user