Skip to content
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

How to restrict creating extensions and poersonas? #434

Open
avzolo01 opened this issue Sep 24, 2024 · 4 comments
Open

How to restrict creating extensions and poersonas? #434

avzolo01 opened this issue Sep 24, 2024 · 4 comments

Comments

@avzolo01
Copy link

Hi Folks
Is there a way to restrict access to creating personas and extensions?

@fsch-ppi
Copy link

Sure thing. I did the most basic approach and made it possible to create only by admins:

Changed the extension-service.ts
image

Changed the persona-service.ts so only admins can publish personas.
image

You could do the first example in the second case if you only want admins to be able to create them at all

@agg-anwarulislam
Copy link

Hi Florian, i am new to this, can you please advise where you changed this so i can do the same.

@mkandukuri4
Copy link

mkandukuri4 commented Oct 23, 2024

@fsch-ppi have you also implemented access controls on extensions, so it will be visible to specific SG's

@fsch-ppi
Copy link

fsch-ppi commented Nov 1, 2024

@mkandukuri4 I simply added a "viewers" and "editors" field to Personas, Extensions and Prompts (that hold comma seperated emails since we use microsoft for authentification)

The Find functions then search for all Entries with the userID,
all published entries if the user is admin
and all entries where the user is in the viewers field

When editing it is checked
if the user either is admin, created the entry or is present in the editors field.

This is not sophisticated management but fully sufficient for our usecase!

Also I programmed this in a way, that only admins can actually see and set viewers and editor fields, otherwise they will be blank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants