Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Version: Windchill 13.0
Use Case: There are probably several use cases for this, however mine is pretty specific. I would like to find out if there is an ability to limit the number of people in a group.
Description:
I work at a multi-location organization where each location has their own budget/allocation of resources. We are looking at consolidating Windchill into a single instance, however the locations need to independently manage their allocation of licenses. My thought would be to have a group assigned to each location for each license, and limit the number of people that can be added to the group based on the number of licenses allocated to that location.
Thoguhts?
Solved! Go to Solution.
James, I couldn't resist so I got this working.
In my code I've limited the number for users in the "Administrators" group to two.
In the screenshot below I have two users in this group.
When I attempt to add another user....
I'm notified that the maximum number of users for this group is 2 and I cannot add another user.
And yes, the code takes into account users that are in sub-groups.
Not a problem @jbailey
Use a listener to detect when a user or group is added to the group in question. If this addition exceeds the allowable number throw an exception state the max number is X and that number had been exceeded by Y users.
Since we don't do much customization here, I may ask a few "basic" questions... Could this easily be done with specific groups?
Great, thanks. I will have to look at the customization guide on this.
James, I couldn't resist so I got this working.
In my code I've limited the number for users in the "Administrators" group to two.
In the screenshot below I have two users in this group.
When I attempt to add another user....
I'm notified that the maximum number of users for this group is 2 and I cannot add another user.
And yes, the code takes into account users that are in sub-groups.
Improved Exception message:
Then shalt thou count to three, no more, no less. Three shall be the number thou shalt count, and the number of the counting shall be three. Four shalt thou not count, neither count thou two, excepting that thou then proceed to three. Five is right out.
😂
Awesome, any guidance on where I should start with this?