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:
parent
c5ab3b863c
commit
1dd176e31c
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user