From b5eb821cfa3bbc409ea40dbdd3ab74919c377c4b Mon Sep 17 00:00:00 2001 From: Oleksii Kriuchykhin Date: Tue, 6 Mar 2018 16:40:25 +0100 Subject: [PATCH] Fix sample's custom column permissions [SCI-2135] --- app/permissions/team.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/permissions/team.rb b/app/permissions/team.rb index c9d4c7793..86c9bf6cd 100644 --- a/app/permissions/team.rb +++ b/app/permissions/team.rb @@ -98,9 +98,7 @@ end Canaid::Permissions.register_for(CustomField) do # sample: update/delete field can :manage_sample_column do |user, custom_field| - custom_field.sample_custom_fields.all? do |sample_custom_field| - can_create_sample_columns?(user, sample_custom_field.sample) - end + can_create_sample_columns?(user, custom_field.team) end end