Able to login but not able to update when deployed on server. Working fine in localhost
what exactly are you trying to do? and what errors do you see in your console?
not able to update or delete when access is import type { Access, AccessArgs } from 'payload/config'
import type { Access } from "payload/types";
import { checkRole } from "./checkRole";
const adminsAndUser: Access = ({ req: { user } }) => {
if (user) {
if (checkRole(['admin'], user)) {
return true
}
return {
id: { equals: user.id },
};
}
return false;
};
export default adminsAndUser;
403 forbidden
errors
:
[{message: "You are not allowed to perform this action."}]
api/payload-preferences/locale route returns {"message":"Not Found","value":null}
but working fine in localhost
Used backend url in cors csrf and cookies-domain
nice to see you got it solved!
Can you share any further detail on your solve? I've been troubleshooting this exact problem for days
Star
Discord
online
Get dedicated engineering support directly from the Payload team.