Fixed guest server queries
This commit is contained in:
@@ -8,28 +8,3 @@
|
||||
|
||||
using namespace ts;
|
||||
using namespace ts::server;
|
||||
|
||||
permission::v2::PermissionFlaggedValue InstancePermissionHelper::calculate_permission(
|
||||
permission::PermissionType permission,
|
||||
ClientDbId cldbid,
|
||||
ClientType type,
|
||||
ChannelId channel,
|
||||
bool granted,
|
||||
std::shared_ptr<CalculateCache> cache
|
||||
) const {
|
||||
auto result = this->calculate_permissions({permission}, cldbid, type, channel, granted, cache);
|
||||
if(result.empty()) return {0, false};
|
||||
return result.front().second;
|
||||
}
|
||||
|
||||
std::vector<std::pair<permission::PermissionType, permission::v2::PermissionFlaggedValue> > InstancePermissionHelper::calculate_permissions(
|
||||
const std::deque<permission::PermissionType> &permissions,
|
||||
ClientDbId cldbid,
|
||||
ClientType type,
|
||||
ChannelId channel,
|
||||
bool granted,
|
||||
std::shared_ptr<CalculateCache> /* cache */
|
||||
) const {
|
||||
ClientPermissionCalculator calculator{nullptr, cldbid, type, channel};
|
||||
return calculator.calculate_permissions(permissions, granted);
|
||||
}
|
||||
Reference in New Issue
Block a user