How to restrict the visibility of a sidebar app for certain users?

I am writing code for a sidebar but I only want some users to be able to see it based on the groups they belong to. The app.activated event is too late.

How can I set the visibility of a custom sidebar app (in a ticket) based on the user’s membership in a set of groups?

Thanks

Adam

Hi Adam,

The app.initialized event is the initial life-cycle event that is received in the app. If any restriction has to happen on the first page load, that has to be done in this event.

There’s no other way in the app configuration or inside the app to restrict the app access to certain users.

1 Like

That seems too late doesn’t it? I guess the sidebar would just flash and be gone. I’ll have to try it.

The app cannot be hidden for certain users. Only the contents inside the app can be hidden with a custom logic.
Try it out and let us know if there’s a flicker.

Also, if you have the requirement to completely hide the app based on user groups or any other conditions, we might have to take it up as a feedback as it’s not possible right now. Let us know if that’s the case.

1 Like