acl check

This commit is contained in:
Mike Kot 2023-07-03 14:13:26 +00:00
parent b4f750ed66
commit 297d566600
2 changed files with 6 additions and 2 deletions

View File

@ -314,6 +314,9 @@ KeeperStorage::ResponseForSession KeeperStateMachine::processReconfiguration(
return { session_id, std::move(res) };
};
if (!storage->checkACL(keeper_config_path, Coordination::ACL::Write, session_id, true))
return bad_request(ZNOAUTH);
KeeperDispatcher& dispatcher = *keeper_context->getDispatcher();
if (!dispatcher.reconfigEnabled())
return bad_request(ZUNIMPLEMENTED);

View File

@ -183,7 +183,8 @@ private:
KeeperSnapshotManagerS3 * snapshot_manager_s3;
KeeperStorage::ResponseForSession processReconfiguration(const KeeperStorage::RequestForSession& request_for_session);
KeeperStorage::ResponseForSession processReconfiguration(
const KeeperStorage::RequestForSession& request_for_session)
TSA_REQUIRES(storage_and_responses_lock);
};
}