diff --git a/lib/base/dynamicobject.cpp b/lib/base/dynamicobject.cpp index 21ad26167..f1ec498c5 100644 --- a/lib/base/dynamicobject.cpp +++ b/lib/base/dynamicobject.cpp @@ -79,7 +79,12 @@ void DynamicObject::SetAuthority(const String& type, bool value) bool DynamicObject::HasAuthority(const String& type) const { - return GetAuthorityInfo()->Get(type); + Dictionary::Ptr authorityInfo = GetAuthorityInfo(); + + if (!authorityInfo->Contains(type)) + return true; + + return authorityInfo->Get(type); } void DynamicObject::SetPrivileges(const String& instance, int privs)