Welcome to mirror list, hosted at ThFree Co, Russian Federation.

timelog_policy.rb « policies « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 02380604c608cf138c1eee7783920362a4cc9b33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# frozen_string_literal: true

class TimelogPolicy < BasePolicy
  delegate { @subject.issuable }

  desc "User who created the timelog"
  condition(:is_author) { @user && @subject.user == @user }

  rule { is_author | can?(:maintainer_access) }.policy do
    enable :admin_timelog
  end
end