8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 00:03:02 +01:00

Using effective user as grantor instead of current one.

This commit is contained in:
Roman Simakov 2019-06-25 12:34:15 +03:00
parent c5ab3b863c
commit 1dd176e31c
2 changed files with 9 additions and 1 deletions

View File

@ -11693,7 +11693,7 @@ void GrantRevokeNode::grantRevoke(thread_db* tdbb, jrd_tra* transaction, const G
(Arg::PrivateDyn(295) << DBA_USER_NAME << owner).raise();
}
MetaName currentUser(attachment->att_user->getUserName());
MetaName currentUser(attachment->getEffectiveUserId()->getUserName());
MetaName grantorRevoker(grantor ? *grantor : currentUser);
if (!isGrant && !privs) // REVOKE ALL ON ALL

View File

@ -592,6 +592,14 @@ public:
UserId* getUserId(const Firebird::MetaName &userName);
const UserId* getEffectiveUserId() const
{
if (att_ss_user)
return att_ss_user;
return att_user;
}
private:
Attachment(MemoryPool* pool, Database* dbb, const InitialOptions* initialOptions);
~Attachment();