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 validate user permissions on custom components, commands, etc.? #287

Open
relizondobarrios opened this issue Mar 1, 2021 · 1 comment
Labels

Comments

@relizondobarrios
Copy link

We are working with Module Builder and creating a content type called Catalog. For Catalog, we hide the standard "Create" button and instead implement our "Create" button.

Our "Create" button opens a dialog and inserts a catalog item using the Sitefinity web services API.
Now, we need to validate the user permissions in this creation process.
For example: We only want to allow administrator users to create catalogs.

How can we integrate user permission validations into our custom components, commands, etc.?

@Novkirishki
Copy link
Contributor

Hi @relizondobarrios, to achieve the desired behavior you can do the following:

  • Create a custom OData endpoint that validates/checks user permissions using the Sitefinity API
  • Call the endpoint to validate the permissions before opening the dialog/executing the operation

The client application (AdminApp) has no knowledge of user permissions. This logic takes place on the server.

Hope this helps.

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

No branches or pull requests

2 participants