on ‎2007 Mar 06 1:22 PM
I would like to hide a form and an applet on a user's screen if the user is not part of a role that has access to it. How can I do this?
I know how to get the username (<p></p>), but how can I get the role and are there any other universal xMII params like this that I should be aware of?
Thanks!!
Request clarification before answering.
Here are the built-in session properties, and an example of their value:
IllumLoginName - localadmin
Description - Default Localhost User
Machine - 127.0.0.1
FullName - Localhost Administrator
Language - en
IllumLoginRoles - Administrators,Developers,Everyone
You'll note that the roles are a comma separated list of all roles the user is a member of.
- Rick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just be forewarned that even if it is hidden, it will still attempt to run and access the data...and that not all JVM versions behave nicely with "hidden applets" - sometimes they do, sometimes they don't...
A more robust approach might be to create a JSP page that built the page dynamically from the server side (since the xMII parameters are simply web session parameters, you can access them by name in JSP as you would any other session values).
Since I'm a BLS fan, I'd probably do it with BLS and have the page be entirely "virtual" and streamed back from BLS. I'd build the individual sections as HTML snippets, load them/concatenate them within BLS based on the users' roles.
You can pass the user's roles into a BLS service by using the "AutoBind" capabilities and defining a string transaction input named IllumLoginRoles.
A third option would be do dynamically build the page from the client side using DHTML and document.write, but that might be a maintenance nightmare.
- Rick
Hello xMII_Training ;*)
check out this part of the Help Docs:
http://<servername>/LighthammerCMS/Help/Personalization/Personalization.htm
It gives you a list of the Login Session Cookies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.