Don't apply filter for admins

pull/1455/head
Hagen Schink 11 years ago
parent 97ac24f647
commit 8d2b0608a8
  1. 2
      app/models/work_package_custom_field.rb

@ -33,7 +33,7 @@ class WorkPackageCustomField < CustomField
has_many :work_packages, :through => :work_package_custom_values
scope :visible_by_user, lambda { |user|
joins(projects: :memberships).where("members.user_id = ?", user.id)
joins(projects: :memberships).where("members.user_id = ?", user.id) unless user.admin?
}
def type_name

Loading…
Cancel
Save