Restrict access to widget(s) based on user group?

2864
6
Jump to solution
06-22-2016 08:25 PM
PascualBenito
New Contributor III

I would like to restrict access to certain widgets in my app  to only certain groups of users within my organization (we are using Portal for Server).  Can this be done in WAB (dev edition)? (as an example, let's say I wanted the print widget or layer control widgets to only be accessible by certain users).

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

Pascual,

  Yes this is possible using WAB Dev. Here is a thread that talking about showing certain widgets based on the user logged in.

How can I toggle the visibility of a widget?

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Pascual,

  Yes this is possible using WAB Dev. Here is a thread that talking about showing certain widgets based on the user logged in.

How can I toggle the visibility of a widget?

PascualBenito
New Contributor III

Hi Robert,

thanks for the the link to the other discussion.  Alas, I was of course hoping for something out-of-the-box in terms of some kind of WAB configuration for applying permissions to a widget akin to applying permissions to a web map, but I suspected that was not likely something in place yet in WAB.

If I understand correctly, we will need to develop a "widget visibility control" widget that runs at startup and has the function of getting the username/group and then sets the visible state of each widget depending on which widgets are allowed for a particular user/group.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Pascual,

Yes or just add that code to one of the existing js files like the MapManager or some other.

MichaelRobb
Regular Contributor II

Hmm.

I am a bit confused with the link.  You mention 'based on user login', but I don't see where this happens anywhere.  I am faced with having to somehow show specific widgets based on the Windows Authentication that is done through IIS and Active Directory.  Do you perhaps know a direction to look? Thanks

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Michael,

   You would likely wrap the WAB app in a .net wrapper that would handle authentication and then use that user info to determine the widgets allowed. There is nothing in the link provided for that portion as it has nothing specifically to do with the JS API or WAB.

0 Kudos
MichaelRobb
Regular Contributor II

Makes sense.  Thanks for clarifying. 

0 Kudos