2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Include this module if we want to pass something else than the user to
|
|
|
|
# check policies. This defines several methods which the policy checker
|
|
|
|
# would call and check.
|
|
|
|
module PolicyActor
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
def blocked?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def admin?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def external?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def internal?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def access_locked?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def required_terms_not_accepted?
|
|
|
|
false
|
|
|
|
end
|
|
|
|
|
|
|
|
def can_create_group
|
|
|
|
false
|
|
|
|
end
|
2020-03-09 13:42:32 +05:30
|
|
|
|
|
|
|
def alert_bot?
|
|
|
|
false
|
|
|
|
end
|
2018-11-18 11:00:15 +05:30
|
|
|
end
|
2019-12-04 20:38:33 +05:30
|
|
|
|
|
|
|
PolicyActor.prepend_if_ee('EE::PolicyActor')
|