fixed a bug where GetAdminFlag could return false if a user had root
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40913
This commit is contained in:
parent
9f9b92ec43
commit
d79c0223c1
@ -951,7 +951,12 @@ bool AdminCache::GetAdminFlag(AdminId id, AdminFlag flag, AccessMode mode)
|
|||||||
{
|
{
|
||||||
return ((pUser->flags & bit) == bit);
|
return ((pUser->flags & bit) == bit);
|
||||||
} else if (mode == Access_Effective) {
|
} else if (mode == Access_Effective) {
|
||||||
return ((pUser->eflags & bit) == bit);
|
bool has_bit = ((pUser->eflags & bit) == bit);
|
||||||
|
if (!has_bit && flag != Admin_Root && ((pUser->eflags & ADMFLAG_ROOT) == ADMFLAG_ROOT))
|
||||||
|
{
|
||||||
|
has_bit = true;
|
||||||
|
}
|
||||||
|
return has_bit;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user