Commit 821b14be authored by Mark Chao's avatar Mark Chao

Improve naming

parent bbe2bc71
......@@ -155,7 +155,7 @@ module EE
end
class Epic < Grape::Entity
allowed_to_admin = ->(epic, opts) { Ability.allowed?(opts[:user], :admin_epic, epic) }
can_admin_epic = ->(epic, opts) { Ability.allowed?(opts[:user], :admin_epic, epic) }
expose :id
expose :iid
......@@ -164,12 +164,12 @@ module EE
expose :description
expose :author, using: ::API::Entities::UserBasic
expose :start_date
expose :start_date_is_fixed?, as: :start_date_is_fixed, if: allowed_to_admin
expose :start_date_fixed, :start_date_from_milestones, if: allowed_to_admin
expose :start_date_is_fixed?, as: :start_date_is_fixed, if: can_admin_epic
expose :start_date_fixed, :start_date_from_milestones, if: can_admin_epic
expose :end_date # @deprecated
expose :end_date, as: :due_date
expose :due_date_is_fixed?, as: :due_date_is_fixed, if: allowed_to_admin
expose :due_date_fixed, :due_date_from_milestones, if: allowed_to_admin
expose :due_date_is_fixed?, as: :due_date_is_fixed, if: can_admin_epic
expose :due_date_fixed, :due_date_from_milestones, if: can_admin_epic
expose :created_at
expose :updated_at
expose :labels do |epic, options|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment