Tighten support API resource mutations
This commit is contained in:
@@ -70,21 +70,36 @@ return [
|
|||||||
'read' => ['support:read'],
|
'read' => ['support:read'],
|
||||||
'write' => ['support:write'],
|
'write' => ['support:write'],
|
||||||
],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => true,
|
||||||
|
'delete' => false,
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'events' => [
|
'events' => [
|
||||||
'model' => Event::class,
|
'model' => Event::class,
|
||||||
'search' => ['name', 'slug'],
|
'search' => ['name', 'slug'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:read'],
|
'read' => ['support:read'],
|
||||||
'write' => ['support:write'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'event-types' => [
|
'event-types' => [
|
||||||
'model' => EventType::class,
|
'model' => EventType::class,
|
||||||
'search' => ['name', 'slug'],
|
'search' => ['name', 'slug'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:read'],
|
'read' => ['support:read'],
|
||||||
'write' => ['support:write'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'photos' => [
|
'photos' => [
|
||||||
@@ -122,17 +137,27 @@ return [
|
|||||||
'packages' => [
|
'packages' => [
|
||||||
'model' => Package::class,
|
'model' => Package::class,
|
||||||
'search' => ['name', 'slug'],
|
'search' => ['name', 'slug'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:billing'],
|
'read' => ['support:billing'],
|
||||||
'write' => ['support:billing'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'package-addons' => [
|
'package-addons' => [
|
||||||
'model' => PackageAddon::class,
|
'model' => PackageAddon::class,
|
||||||
'search' => ['name', 'slug'],
|
'search' => ['name', 'slug'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:billing'],
|
'read' => ['support:billing'],
|
||||||
'write' => ['support:billing'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'tenant-packages' => [
|
'tenant-packages' => [
|
||||||
@@ -146,17 +171,27 @@ return [
|
|||||||
'coupons' => [
|
'coupons' => [
|
||||||
'model' => Coupon::class,
|
'model' => Coupon::class,
|
||||||
'search' => ['code', 'name'],
|
'search' => ['code', 'name'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:billing'],
|
'read' => ['support:billing'],
|
||||||
'write' => ['support:billing'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'gift-vouchers' => [
|
'gift-vouchers' => [
|
||||||
'model' => GiftVoucher::class,
|
'model' => GiftVoucher::class,
|
||||||
'search' => ['code', 'email'],
|
'search' => ['code', 'email'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:billing'],
|
'read' => ['support:billing'],
|
||||||
'write' => ['support:billing'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'tenant-feedback' => [
|
'tenant-feedback' => [
|
||||||
@@ -175,25 +210,40 @@ return [
|
|||||||
'tenant-announcements' => [
|
'tenant-announcements' => [
|
||||||
'model' => TenantAnnouncement::class,
|
'model' => TenantAnnouncement::class,
|
||||||
'search' => ['title', 'body'],
|
'search' => ['title', 'body'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:read'],
|
'read' => ['support:read'],
|
||||||
'write' => ['support:write'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'media-storage-targets' => [
|
'media-storage-targets' => [
|
||||||
'model' => MediaStorageTarget::class,
|
'model' => MediaStorageTarget::class,
|
||||||
'search' => ['name', 'driver'],
|
'search' => ['name', 'driver'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:ops'],
|
'read' => ['support:ops'],
|
||||||
'write' => ['support:ops'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'retention-overrides' => [
|
'retention-overrides' => [
|
||||||
'model' => RetentionOverride::class,
|
'model' => RetentionOverride::class,
|
||||||
'search' => ['id'],
|
'search' => ['id'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:ops'],
|
'read' => ['support:ops'],
|
||||||
'write' => ['support:ops'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'data-exports' => [
|
'data-exports' => [
|
||||||
@@ -225,54 +275,79 @@ return [
|
|||||||
'legal-pages' => [
|
'legal-pages' => [
|
||||||
'model' => LegalPage::class,
|
'model' => LegalPage::class,
|
||||||
'search' => ['slug', 'title'],
|
'search' => ['slug', 'title'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:content'],
|
'read' => ['support:content'],
|
||||||
'write' => ['support:content'],
|
|
||||||
],
|
],
|
||||||
'mutations' => [
|
'mutations' => [
|
||||||
'create' => false,
|
'create' => false,
|
||||||
'update' => true,
|
'update' => false,
|
||||||
'delete' => false,
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'blog-categories' => [
|
'blog-categories' => [
|
||||||
'model' => BlogCategory::class,
|
'model' => BlogCategory::class,
|
||||||
'search' => ['name', 'slug'],
|
'search' => ['name', 'slug'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:content'],
|
'read' => ['support:content'],
|
||||||
'write' => ['support:content'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'blog-posts' => [
|
'blog-posts' => [
|
||||||
'model' => BlogPost::class,
|
'model' => BlogPost::class,
|
||||||
'search' => ['title', 'slug'],
|
'search' => ['title', 'slug'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:content'],
|
'read' => ['support:content'],
|
||||||
'write' => ['support:content'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'emotions' => [
|
'emotions' => [
|
||||||
'model' => Emotion::class,
|
'model' => Emotion::class,
|
||||||
'search' => ['name', 'slug'],
|
'search' => ['name', 'slug'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:content'],
|
'read' => ['support:content'],
|
||||||
'write' => ['support:content'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'tasks' => [
|
'tasks' => [
|
||||||
'model' => Task::class,
|
'model' => Task::class,
|
||||||
'search' => ['title'],
|
'search' => ['title'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:read'],
|
'read' => ['support:read'],
|
||||||
'write' => ['support:write'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'task-collections' => [
|
'task-collections' => [
|
||||||
'model' => TaskCollection::class,
|
'model' => TaskCollection::class,
|
||||||
'search' => ['name'],
|
'search' => ['name'],
|
||||||
|
'read_only' => true,
|
||||||
'abilities' => [
|
'abilities' => [
|
||||||
'read' => ['support:read'],
|
'read' => ['support:read'],
|
||||||
'write' => ['support:write'],
|
],
|
||||||
|
'mutations' => [
|
||||||
|
'create' => false,
|
||||||
|
'update' => false,
|
||||||
|
'delete' => false,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'super-admin-action-logs' => [
|
'super-admin-action-logs' => [
|
||||||
|
|||||||
Reference in New Issue
Block a user