Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 219
  • Last Modified:

Super User

I am trying to allow a superuser who is in all user groups to be able to select which group they would like to log in as so they are able to simulate what another user in that group would see and carry out what that user has the right to do.

I have two lists on a form, one is the roles the other is groups.  The superuser will select which ones they want to simulate and then submit the form, they should then see what the role/group can see and do.
 
I have tried having two computed fields  i.e EffectiveName & EffectiveRoles with all the hide when etc looking at these to display or not.  Currently these are set to @UserRoles & @UserName.  

Is there a way I can use these fields on my SuperUser form to carry ut what I want to do?

Thanks in advance
0
fayeb
Asked:
fayeb
  • 6
  • 5
1 Solution
 
ZvonkoSystems architectCommented:
No, there is no way to simulate ACL rights in R5.



0
 
SandraECommented:
We create user IDs for testing.  To make this quick, I created a location doc for each ID.  That way switching to the location automatically switches IDs and prompts me for a password.  I also associated my own ID with my usual location to speed up switching back and forth.
0
 
fayebAuthor Commented:
Thanks guys I will try option b and use cookies
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
ZvonkoSystems architectCommented:
Oh yea, take cookies and a cup of tea :-)
0
 
fayebAuthor Commented:
Can you please tell me how I set up a cookie and set the value of the field to the cookie?

Thanks
0
 
ZvonkoSystems architectCommented:
This is the line to set a cookie in JavaScript:
document.cookie="cookiename="+escape("cookievalue")+";path=/;";

The upper cookie will be valid for the live time of the browser session.
Most cases is this live time ok.

If you like to have a cookie valid for seven days, then you have to add the "expires=" option.

Like this:

document.cookie="cookiename="+escape("cookievalue")+";path=/;expires="+(new Date((new Date()).getTime() + 604800000)).toGMTString();


Good luck,
Zvonko

0
 
ZvonkoSystems architectCommented:
Oh, upper script was only to SET the cookie value on browser side.

To read the cookie value on Domino side you have to do this:
1.) Create a Field of your form with the name HTTP_Cookie
2.) This Field has only to be there. It can be hidden, editable or not. It has to be there.
3.) Your destination Field where you like to put the cookie value has to have this formula:
FIELD HTTP_Cookie:=HTTP_Cookie;
@Left(@Right(HTTP_Cookie;"cookiename=")+";");";")

That's all.

Regards,
Zvonko


0
 
fayebAuthor Commented:
how do I set the value of the multi value field 'EffectiveRoles' to the cookie and retrieve it?

Thanks
0
 
ZvonkoSystems architectCommented:
In my upper scenario is your cookie only one extra field.
So you have to refine your question.
First of all is the question when should this cookie be first time set?
Second question is when should cookie content take precedence over your destination field EffectiveRoles content?

Technically is it no problem to set cookie, read cookie and transfer the value to any field, but the question is: under what condition should this happen?
For example: it does not make sense to transfer cookie content to EffectiveRoles field when empty cookie value would overwrite some content in destination field. And so on.

So please give more processing details and I can show you the formulas.

So long,
Zvonko


0
 
fayebAuthor Commented:
I have a multi value dialog list called 'Roles' this does a look up of all the user roles available in the ACL.  A user will then select which roles they want to and submit the form.  On submission this should call the javascript to set the cookie value.

The cookie value will need to store the roles the user has selected in 'Roles' field.  There will then be a field called 'EffectiveRoles' stored on all the forms in the database which will need to get the values of the 'Roles' field stored in the cookie.  If the cookies is empty ie the user has not submitted the form then the field will be set to @UserRoles.

I need to know how to set the multi values of the 'Roles' field in the cookie and then retrieve them in the 'EffectiveRoles' field.

I hope this makes a little more sense.  Thanks for all your help.
0
 
ZvonkoSystems architectCommented:
Should we go on work on both questions?
0
 
fayebAuthor Commented:
Thanks for all your help on this.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now