Restrict Direct URL Page Access for Specific Email IDs Without Creating Roles in Mendix

0
Hi,I have a page in Mendix which is accessed directly using a manually typed URL and not through any button or microflow navigation.For a temporary requirement, I want only a few specific email IDs/users to access this page, and all other users should be restricted even if they know the URL.I do not want to create separate user roles for this temporary setup.What would be the best approach to achieve this in Mendix?Thanks!
asked
3 answers
0

Hi Reemali,


Try using the Microflow URL instead of the Page URL. This will allow you to implement custom logic within the microflow, such as restricting users based on their email ID or specific user accounts, to achieve the desired outcome.


Regards,

Sathish Kumar

answered
0

Hi Reemali Patil


Since you don't want new roles, the best pattern is to control access inside the page itself using a Nanoflow/Microflow check on page load that validates if the current user is in your allowed list, and redirects them away if not show some message like unauthorized. This is easy and simple to do.


I hope this helps

answered
0

This is how I implemented this capability:


A. Create entity AnonymousStatus

B. Create a page for anonymous users that has this entity on it

C. When the user clicks the top button, they get this page

D. Which uses this entity

E. After providing their email address and name in the popup window, the app checks the email address against a list of approved addresses and/or domains. If successful, the user receives a token via email.

F. On this page, they fill out their email address and token. Then this microflow validates their credentials


After successful validation, the AnonymousStatus object is updated to indicate they are validated.


One note: after validation, you should take the user to a separate page with the content you want them to see. Or if they don't validate, you can display a message indicating that.


Hope that gives you enough to get started.

answered