Hello,
I have my own custom model-driven app that requires our standard roles to be accessed.
On top of the role, I would like to add another security layer managed from our developer environment which is the same concept as licensing for CRM modules.
For example, if you have been assigned to the standard role that is required to access the app and you don't have a certain license assigned to you. It should not allow you to access the app even if you have a standard role or you are a system administrator. That will be managed from our development environment.
The following excel table is similar to our development environment table:
Simply, User 1 has the standard role assigned but does not have a license meaning if user 1-> plays the model-driven-> on the landing page it should block him from accessing it and he should contact us to assign him a license.
This is very similar to the following:
https://xrmtricks.com/2021/05/07/how-to-run-javascript-code-when-loading-a-model-driven-app/
My questions are below:
- 1. Can we write a custom code to the OnLoad event of the application (NOT THE FORM) after playing the app or signing in check if the user has a license in our environment and we can decide if we allow him to access it or not?
- 2. I know that we can add a code onLoad event of the form but the landing page of our application is not a form it is the Dashboard screen meaning a page.
- 3. If the user does not have a license assigned can we block him from clicking on the site map and navigating and show him that he needs to have a license?
The main goal is to restrict access to the model-driven app using a custom code when the app is opened if the user does not have a valid license other than the security role assigned.
Any help is greatly appreciated.
Best regards,