# Admin Components Questions

**URL:** <https://forum.inductiveautomation.com/t/admin-components-questions/6427>\
**Category:** Ignition\
**Created:** [May 9, 2013, 2:59pm UTC](https://forum.inductiveautomation.com/t/admin-components-questions/6427 "2013-05-09T14:59:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![allenr8](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@allenr8](https://forum.inductiveautomation.com/u/allenr8)\
**Post date:** [May 9, 2013, 2:59pm UTC](https://forum.inductiveautomation.com/t/admin-components-questions/6427/1 "2013-05-09T14:59:16Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [May 9, 2013, 6:05pm UTC](https://forum.inductiveautomation.com/t/admin-components-questions/6427/2 "2013-05-09T18:05:00Z")

</div>

see carls post at the end.

[viewtopic.php?f=90&t=9799&start=15](http://www.inductiveautomation.com/forum/viewtopic.php?f=90&t=9799&start=15)

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

---

<div class="post-metadata">

**Author:** ![allenr8](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@allenr8](https://forum.inductiveautomation.com/u/allenr8)\
**Post date:** [May 10, 2013, 4:02pm UTC](https://forum.inductiveautomation.com/t/admin-components-questions/6427/3 "2013-05-10T16:02:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Carl.Gould](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/carl.gould/32/7262_2.png) [@Carl.Gould](https://forum.inductiveautomation.com/u/Carl.Gould)\
**Post date:** [May 20, 2013, 5:23pm UTC](https://forum.inductiveautomation.com/t/admin-components-questions/6427/4 "2013-05-20T17:23:48Z")

</div>

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

> [@allenr8](#):
>
> 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)?

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`

> [@allenr8](#):
>
> Also the biggest thing for me is the rosters - I don't see any extension function on those to filter what rosters are shown.

I can add that.  
\*Edit - added for 7.6.1

---

<div class="post-metadata">

**Author:** ![allenr8](https://avatars.discourse-cdn.com/v4/letter/a/e56c9b/32.png) [@allenr8](https://forum.inductiveautomation.com/u/allenr8)\
**Post date:** [May 23, 2013, 3:47pm UTC](https://forum.inductiveautomation.com/t/admin-components-questions/6427/5 "2013-05-23T15:47:59Z")

</div>

Thanks Carl!
