I have created a button on right hand top side under quick links menu.That will allow the user's to change the constraints of attributes in certain types.But I have to allow user's with certain roles only can able to proceed and change the values.
Since the button is on quick links menu,I can't get the context,object and other details.Is there a way to get the role of that User.What API do I need to use inorder to get the role of particular user?Also I don't know the user's team and group.Is there any API?
I am not sure how, or if you even can, do this. The role of the person is context specific, and if you can't get the context of the item, I don't see how you could then see what roles the person held within that specific context.
Perhaps I am missing something, but why are you putting a control for an object in the Quick Links menu, and not under a menu for the object. How is the command going to know what item(s) should have their attributes modified if it is up there. Shouldn't it be on an object specific menu?
Not every user except admin can modify the constraints of attributes in object types(i.e.,for WTPart,WTDocument,..).Here with this menu I'm allowing other users with specific role can able to modify the attribute's constraints.Its not specific with particular object.Now I've acheived this by giving the group and so on
In Windchill 10 M010~M030 ,I try to check constraints for WTPart and WTDocument in some page by LWC API.
com.ptc.core.lwc.common.view.TypeDefinitionReadView view= com.ptc.core.lwc.server.TypeDefinitionServiceHelper.service.getTypeDefView(com.ptc.core.meta.common.TypeIdentifier);
Finally, I got com.ptc.core.lwc.common.view.ConstraintDefinitionReadView objects in collection.
It maybe a way to try to find out what APi can help you to achieve constraints of attributes.
Menu permission is a general customize to do by Filter.