debian-mirror-gitlab/app/policies/timelog_policy.rb

13 lines
291 B
Ruby
Raw Normal View History

2021-04-29 21:17:54 +05:30
# frozen_string_literal: true
class TimelogPolicy < BasePolicy
2021-09-04 01:27:46 +05:30
delegate { @subject.issuable }
2022-07-16 23:28:13 +05:30
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
2021-04-29 21:17:54 +05:30
end