feat(acl): add pub/sub (#3574)

* add support for pub/sub
* add tests
---------

Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
Kostas Kyrimis 2024-08-30 15:41:28 +03:00 committed by GitHub
parent a22eff15dc
commit 0705bbb536
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 445 additions and 85 deletions

View file

@ -1701,6 +1701,7 @@ bool ServerFamily::DoAuth(ConnectionContext* cntx, std::string_view username,
auto cred = registry->GetCredentials(username);
cntx->acl_commands = cred.acl_commands;
cntx->keys = std::move(cred.keys);
cntx->pub_sub = std::move(cred.pub_sub);
cntx->ns = &namespaces.GetOrInsert(cred.ns);
cntx->authenticated = true;
}