mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-25 16:41:36 +01:00
35588d09e2
- `GET /api/v1/admin/domain_allows` lists allowed domains - `GET /api/v1/admin/domain_allows/:id` shows one by ID - `DELETE /api/v1/admin/domain_allows/:id` deletes a given domain from the list of allowed domains - `POST /api/v1/admin/domain_allows` to allow a new domain: if that domain is already allowed, the existing DomainAllow will be returned
19 lines
204 B
Ruby
19 lines
204 B
Ruby
# frozen_string_literal: true
|
|
|
|
class DomainAllowPolicy < ApplicationPolicy
|
|
def index?
|
|
admin?
|
|
end
|
|
|
|
def show?
|
|
admin?
|
|
end
|
|
|
|
def create?
|
|
admin?
|
|
end
|
|
|
|
def destroy?
|
|
admin?
|
|
end
|
|
end
|