Przeglądaj źródła

chores: change collections access

for collection careers, clients and posts, public can view it without logged in as admin
YusufSyam 3 tygodni temu
rodzic
commit
4fef01fdac

+ 3 - 2
src/collections/Careers.ts

@@ -7,6 +7,9 @@ export const Careers: CollectionConfig = {
     useAsTitle: 'title',
     defaultColumns: ['title', 'jobCategory', 'isUrgentlyHiring'],
   },
+  access: {
+    read: () => true,
+  },
   fields: [
     {
       name: 'title',
@@ -17,8 +20,6 @@ export const Careers: CollectionConfig = {
     slugField({
       name: 'slug',
       fieldToUse: 'title',
-      localized: false,
-      unique: true,
     }),
     {
       name: 'image',

+ 3 - 0
src/collections/Clients.ts

@@ -6,6 +6,9 @@ export const Clients: CollectionConfig = {
     useAsTitle: 'name',
     defaultColumns: ['name', 'category', 'href'],
   },
+  access: {
+    read: () => true,
+  },
   fields: [
     {
       name: 'name',

+ 3 - 2
src/collections/Posts.ts

@@ -7,6 +7,9 @@ export const Posts: CollectionConfig = {
     useAsTitle: 'title',
     defaultColumns: ['title', 'type', 'category', 'publishedDate'],
   },
+  access: {
+    read: () => true,
+  },
   fields: [
     {
       name: 'type',
@@ -40,8 +43,6 @@ export const Posts: CollectionConfig = {
     slugField({
       name: 'slug',
       fieldToUse: 'title',
-      localized: false,
-      unique: true,
     }),
     {
       name: 'image',