Temporarily turn off access controls
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
3d4499fb80
commit
519df326ce
@ -2,6 +2,7 @@ import { Access } from 'payload/types'
|
||||
import type { User } from 'types/payload-types'
|
||||
|
||||
export const isAdmin = ({ req: { user } }: any) => {
|
||||
return true
|
||||
if (!user.roles) {
|
||||
return false
|
||||
}
|
||||
@ -14,6 +15,7 @@ export const isAdmin = ({ req: { user } }: any) => {
|
||||
}
|
||||
|
||||
export const isAdminOrCreatedBy = ({ req: { user } }: any) => {
|
||||
return true
|
||||
if (user.role) {
|
||||
return false
|
||||
}
|
||||
@ -34,6 +36,7 @@ export const isAdminOrCreatedBy = ({ req: { user } }: any) => {
|
||||
}
|
||||
|
||||
export const isAdminOrSelf = ({ req: { user } }: any) => {
|
||||
return true
|
||||
if (user) {
|
||||
if (!user.roles) {
|
||||
return false
|
||||
@ -54,6 +57,7 @@ export const isAdminOrSelf = ({ req: { user } }: any) => {
|
||||
}
|
||||
|
||||
export const isAdminOrPublished = ({ req: { user } }: any) => {
|
||||
return true
|
||||
if (user && user?.role === 'admin') {
|
||||
return true
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ import { Access, FieldAccess } from 'payload/types'
|
||||
import type { User } from 'types/payload-types'
|
||||
|
||||
export const isEditor = ({ req: { user } }: any) => {
|
||||
return true
|
||||
if (!user.roles) {
|
||||
return false
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ import { Access, FieldAccess } from 'payload/types'
|
||||
import type { User } from 'types/payload-types'
|
||||
|
||||
export const isUser = ({ req: { user } }: any) => {
|
||||
return true
|
||||
if (!user.roles) {
|
||||
return false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user