-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Share Personas to Groups #465
Comments
It is not supported for default. These fields need to be filled with a csv list of the emails of the people using them. |
@fsch-ppi that sounds amazing, would you be able to share your code? |
I am not allowed to share my full code, however I can provide snippets of the relevant passages (modified functions are shared as a whole, but I did not share the full file - so do not just cut and copy) Hope this helps you out 👍 ! Note: This change does not affect your old personas and they might throw errors. For migration, you will have to add an First, you have to change the data-type model of your personas: This is done in: import { refineFromEmpty } from "@/features/common/schema-validation";
import { z } from "zod";
export const PERSONA_ATTRIBUTE = "PERSONA";
export type PersonaModel = z.infer<typeof PersonaModelSchema>;
export const PersonaModelSchema = z.object({
id: z.string(),
userId: z.string(),
name: z
.string({
invalid_type_error: "Invalid title",
})
.min(1)
.refine(refineFromEmpty, "Title cannot be empty"),
description: z
.string({
invalid_type_error: "Invalid description",
})
.min(1)
.refine(refineFromEmpty, "Description cannot be empty"),
personaMessage: z
.string({
invalid_type_error: "Invalid persona Message",
})
.min(1)
.refine(refineFromEmpty, "System message cannot be empty"),
isPublished: z.boolean(),
type: z.literal(PERSONA_ATTRIBUTE),
createdAt: z.date(),
editors: z.string(),
viewers: z.string(),
}); Next you need to change your permission checks for viewing and editing:
|
I would like to assign Personas to certain groups (not all employees at once). Is this possible?
The text was updated successfully, but these errors were encountered: