Admin Components Questions

Just had some questions about the management components for users, schedules and roles.

  1. Depending on who is logged in is there a way to filter what users show up in the component?
  2. Same thing for rosters?

What I am trying to do is we have several facilities each with their own notification system. I want the managers of each system to be able to manage just their users and roles and not anyone else’s. Just wondering if that is possible with the current components before I start trying to hard. Couldn’t see any simple way to do it.

Thanks!

see carls post at the end.

viewtopic.php?f=90&t=9799&start=15

I havent tried it out yet but I guess it should work for what you need.

That looks like it would work for the users - not exactly clear on how it works - does it loop through each user?

How would the syntax look if I only wanted to show users belonging to Role A when the current user logged in is Role B (Role A manager)?

Also the biggest thing for me is the rosters - I don’t see any extension function on those to filter what rosters are shown.

Guys - I built the extension functions specifically for what you're talking about! Please use them :stuck_out_tongue:

Like this:

def filterUser(self, user): import system myRoles = system.security.getRoles() userRoles = user.getRoles() if "Role B" in myRoles and "Role A" in userRoles: return 1 else: return 0

I can add that.
*Edit - added for 7.6.1

Thanks Carl!