- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Verify User's Role/Privileges after cloning the session
Hello,
I could successfully clone the UserSession from VC plugin UI to VC plugin server. [Using this: Ref]
Now, I want to check if the logged in user has certain permissions. I have to do certain action if the user has the below privileges :
// vLCM Privileges
Configure.Configure Service
VMware vSphere Lifecycle Manager.Lifecycle Manager: Settings Privileges.Read
Is there any way to do this using the cloned UserSession? Any pointers on this will be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Yes, once you have acquired the cloned user session, you can use the vimPort to call different vCenter Server APIs.
We have an example of how to check for certain user privileges in our remote plugin sample present in the vSphere Client SDK deliverable. The code that shows this is in:
<sdk-folder>/samples/remote-plugin-sample/src/main/java/com/vmware/sample/remote/vim25/services/AuthorizationService.java
Best Regards,
Denis