Differentiate UAT and Production environments after user logged in

1
Hello all,   I want to differentiate UAT and Production environment once the user Logged in, I am thinking to use CSS to show a Label once the user logged in.  How can I get to Know whethere its production or UAT. Any chnages I can do by checking URL of the application? If so any predefined functions I can use in HTML for URL.     Thanks in advance!
asked
2 answers
2

Hi Nirmal,

   The easiest way to do this would be to create a string constant in your Mendix model called 'EnvironmentLabel'

   When you deploy your model to your environment, you will be able to set the value for this string to be whatever you want.  For example, on your home page, you can use the format string widget to put a nice label that references your constant.  In the Mendix Cloud portal, when you deploy to any environment, you can set your string variable to be 'Test' or 'UAT' or 'Production'

  There are other options, like using the java action getApplicationURL from the communityCommons app store module, but using a constant gets you the most flexibility.  This way you can call your Acceptance environment 'Test' or 'UAT' or whatever you want.

 Best,

Rob

answered
1

If you, visually want to show what environment the user is logged in to, you might want to take a look at the

https://appstore.home.mendix.com/link/app/425//Environment-Badges

answered