2019-07-30 09:10:46 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class DomainAllowPolicy < ApplicationPolicy
|
2022-06-23 21:12:01 +00:00
|
|
|
def index?
|
2022-07-05 00:41:40 +00:00
|
|
|
role.can?(:manage_federation)
|
2022-06-23 21:12:01 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def show?
|
2022-07-05 00:41:40 +00:00
|
|
|
role.can?(:manage_federation)
|
2022-06-23 21:12:01 +00:00
|
|
|
end
|
|
|
|
|
2019-07-30 09:10:46 +00:00
|
|
|
def create?
|
2022-07-05 00:41:40 +00:00
|
|
|
role.can?(:manage_federation)
|
2019-07-30 09:10:46 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def destroy?
|
2022-07-05 00:41:40 +00:00
|
|
|
role.can?(:manage_federation)
|
2019-07-30 09:10:46 +00:00
|
|
|
end
|
|
|
|
end
|