Skip to content

Commit e8681dc

Browse files
committed
Get rid of locking contexts during first calculation of access rights of a logged user #2.
1 parent a46140f commit e8681dc

2 files changed

Lines changed: 0 additions & 12 deletions

File tree

src/Access/ContextAccess.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -409,15 +409,6 @@ std::shared_ptr<const EnabledRolesInfo> ContextAccess::getRolesInfo() const
409409
return no_roles;
410410
}
411411

412-
std::shared_ptr<const EnabledRowPolicies> ContextAccess::getEnabledRowPolicies() const
413-
{
414-
std::lock_guard lock{mutex};
415-
if (enabled_row_policies)
416-
return enabled_row_policies;
417-
static const auto no_row_policies = std::make_shared<EnabledRowPolicies>();
418-
return no_row_policies;
419-
}
420-
421412
RowPolicyFilterPtr ContextAccess::getRowPolicyFilter(const String & database, const String & table_name, RowPolicyFilterType filter_type) const
422413
{
423414
std::lock_guard lock{mutex};

src/Access/ContextAccess.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ class ContextAccess : public std::enable_shared_from_this<ContextAccess>
5353
/// Returns information about current and enabled roles.
5454
std::shared_ptr<const EnabledRolesInfo> getRolesInfo() const;
5555

56-
/// Returns information about enabled row policies.
57-
std::shared_ptr<const EnabledRowPolicies> getEnabledRowPolicies() const;
58-
5956
/// Returns the row policy filter for a specified table.
6057
/// The function returns nullptr if there is no filter to apply.
6158
RowPolicyFilterPtr getRowPolicyFilter(const String & database, const String & table_name, RowPolicyFilterType filter_type) const;

0 commit comments

Comments
 (0)