Jump to content
  • 0

Redirect Based On Access Level


I am trying to create a button that connects users to a details page depending on their access level. Here is what I have in the button right now (URL changed):


<input onclick="window.open('https://sample.org/edit.html?ID=[@field:Contact_Sheet_Number]')" type="button" value="Edit Content" />


I would like to adjust that so it directs

- user level users to one page: https://sample.org/edit.html

- management level users to one page: https://sample.org/edit1.html

- admin level users to one page: https://sample.org/edit2.html


I was directed to this page for help: http://howto.caspio.com/tech-tips-and-articles/common-customizations/create-user-specific-redirect-after-login/ which explains redirect after login based on access level, but I was wondering if I could just insert the HTML code into the HTML box my button is in (rather than a standalone login screen). Here is the code they recommend: 


if("[@authfield:Admin]" == "Yes"){
window.location = "http://www.mysite.com/admin.html";
else if ("[@authfield:Manager]" == "Yes"){
window.location = "http://www.mysite.com/manager.html";
window.location = "http://www.mysite.com/employee.html";

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...