This commit is contained in:
WolverinDEV 2019-07-19 21:32:31 +02:00
parent c710157030
commit 98929707ae

View File

@ -948,6 +948,13 @@ permission::v2::PermissionFlaggedValue ConnectedClient::calculate_permission_val
return {index->second, index->second != permNotGranted}; return {index->second, index->second != permNotGranted};
} }
auto ref_server = this->server;
if(ref_server) {
auto result = this->server->calculatePermissions2(this->getClientDatabaseId(), {permission}, this->getType(), channel_id, false);
if(!result.empty()) /* it should never be empty! */
return result.back().second;
}
auto value = this->permissionValue(permission::PERMTEST_ORDERED, permission, nullptr); auto value = this->permissionValue(permission::PERMTEST_ORDERED, permission, nullptr);
return {value, value != permNotGranted}; return {value, value != permNotGranted};
} }