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