How do I hide projects based on what roles the user has?

I have a gateway with 15-20 projects and I would like to say user A has permissions on these projects and I would like the rest not to show up. Is there any good way to do this?

I don’t think Ignition has this functionality but I think it is a great idea.

Perhaps this should be moved to feature requests and many people +1 it so that it gets added to a future release of Ignition.

+1

The only thing I can think of would be to have one master project that is shown on the web page and hide all of the others. When users launch the master project then they could be redirected (or shown a list of the other projects) to the other projects that apply to them based on what role they are assigned.

+1 for this feature

Agree with Doug on this one. One ‘master project’ that they log in to. Now, the question is ‘Is there a way to enumerate what projects are on the gateway?’

i could use this feature

+1

How would I hide all of these others? The disable button? Will I still be able to redirect from this main project I am going to create?

I assume you'd have to hard code the redirects, or have them exist inside a dataset and reference a cell from that dataset. So many ways to do things in ignition!

You would go to each individual project and check the “Hide From Launch Page” check mark in the project properties. That will keep the project from being visible from the Ignition web page.

[attachment=0]HideFromLaunchPage.png[/attachment]

The simplest thing to do would be to have a single page “Master Project” that would have all of the other projects listed with buttons that would do a redirect. Then you could hide the buttons that are not applicable based off of the user roles.

You are correct, there are a lot of ways to do it with Ignition! You could get as complicated as you wanted to with database queries and whatnot but sometimes it’s just better to keep it simple…

[quote=“Duffanator”]You would go to each individual project and check the “Hide From Launch Page” check mark in the project properties. That will keep the project from being visible from the Ignition web page.

[attachment=0]HideFromLaunchPage.png[/attachment]

The simplest thing to do would be to have a single page “Master Project” that would have all of the other projects listed with buttons that would do a redirect. Then you could hide the buttons that are not applicable based off of the user roles.

You are correct, there are a lot of ways to do it with Ignition! You could get as complicated as you wanted to with database queries and whatnot but sometimes it’s just better to keep it simple…[/quote]

Thanks man! Will update on how it goes. Really appreciate the screenshot!

This solution works great. :slight_smile: thanks, although if they added the feature as I requested it would make everyone’s lives easy. I was wondering if there would be anyway to create some type of gateway script that could modify how these projects are displayed? 3rd party added functionality I guess? moderators?

We have not really had requests like that. Also, it would only make sense if the gateway web interface was set to the same user source as the projects. Still, I have put in a feature request.

Well, Anna beat me to it, but just to elaborate:

This is an interesting idea, but there are a few issues.

  1. It is not typical for people to even be logged in when looking at the home/launch page. So what shows up when you’re not logged in?

  2. This is the big problem - project permissions are evaluated against that project’s user source, but gateway web interface permissions are evaluated against the gateway’s user source. If these aren’t the same user source, what should happen?

Hi Carl,

The Gateway Settings currently has a field called “Home Page Role(s)”. Adding a role here causes all users to have to log in in order to see the Gateway home page. This should handle point 1 because it causes all users to have to log in.

I have a couple ideas about point 2. One idea is to provide a way to associate the Gateway user source roles with projects to display. This solution would work but be kind of annoying because it requires that someone manually add a user to the Gateway user source for any user in the project user sources.

Another idea would be to add a checkbox configuration setting to the Gateway Settings. The checkbox would say something like, “Check project user sources on login”. Once this is checked then every time someone logs into the gateway the gateway checks the username and password in every user source associated with a project and then only displays the projects where the user is found. I can understand that this solution may require more work and time to implement.

Hello!

I have set up one main-project that retarget’s users to their own projects automatically when they log in. Now I have a small problem with logging out.
When User presses “Log Out” on his own projects it takes him to his PROJECTS log in page, not the main-projects log in page. I have tried to set the log out function to run also the retarget-function but it creates a loop where the user is taken to the main-project and back to his own project.

Anybody have a suggestions on how to make this work so that when user logs out, he is taken to the main-project log in page?

Code-examples are very appreciated!

You can try to hide the standard “Logout” buttons and then roll your own:

system.security.logout()
system.util.retarget("Main-Project")