VMware {code} Community
kumartade
Enthusiast
Enthusiast

Does HTML client SDK(6.5U2 and above) support <privilege> and <propertyConditions> for <metadata> of extensions?

Hi,

Does HTML client SDK(6.5U2 and above) support <privilege> and <propertyConditions> for <metadata> of extensions?

I'm not able to find any info on the SDK Online Documentation - vSphere Client SDK Developer Guide - VMware {code}

Thanks,

Kumar

0 Kudos
11 Replies
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi Kumar,

 

The <propertyConditions> is supported for the vSphere HTML Client, however, the <privilege> is not supported.

 

Best Regards,

Denis

0 Kudos
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi Kumar,

 

As of vSphere Client SDK 6.7U1, you can use <privilege> to filter out extensions based on the user's privilege level.

However, there are some limitations (as described in the docs) such as <privilege> not applying to nodespect and shortcuts because of performance considerations.

 

Best Regards,

Denis

0 Kudos
vaibhav87
Enthusiast
Enthusiast

 Hi Denis,

   Thanks For the update,  privilege tag will work on vCenter 6.7U1 only ? or it will work on previous versions also if we build plugin using Sphere Client SDK 6.7U1.

0 Kudos
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi Kumar,

The <privilege> tag will supposedly work for context objects filtering (not for global views) on 6.5U1 and 6.7GA. This means that if you want to filter a context object view, it should work on these versions. However, if you want to filter global views, you should use 6.7U1 and later versions of the vSphere Client.

In general, the vSphere Client SDK guarantees forward compatibility, meaning that if you develop a plugin using 6.5U1 SDK (for example) it will work on further versions but backward comaptibility is not guaranteed. This is because you may use APIs and extensibility features introduced in this specific version and they cannot work on older versions.

 

Best Regards,

Denis

0 Kudos
kumartade
Enthusiast
Enthusiast

Does <privilege> tag supported for vSphere Context action extensions(vise.actions.sets) as well?

0 Kudos
Denis_Chorbadzh
VMware Employee
VMware Employee

Yes, the <privilege> tag should work for context actions as well.

 

Please let us know if you experience ant issues with it.

0 Kudos
kumartade
Enthusiast
Enthusiast

For SDK 6.5U2 and above?

SDK documentation should include this info.

Please include some sample extensions of sdk sample to demonstrate the privileges as well.

0 Kudos
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi,

 

It should work for some of the previous versions as well.

You can quickly download an SDK from here and test your plugin on different versions to ensure your plugin works on the desired version.

We are working to improve the documentation as well.

Thank you for your feedback.

 

Best Regards,

Denis

0 Kudos
kumartade
Enthusiast
Enthusiast

We used to enable and disable the vSphere context actions  using <requiredPrivilege> tag in actionSpec.

Does HTML client will support this kind of action enable and disable mechansim on right click?

Sample snippet:

              <com.vmware.actionsfw.ActionSpec>

               <uid>com.company.removeDatastore</uid>

               <label>#{destroyDatastore}</label>

               <icon>#{delete.icon}</icon>

               <acceptsMultipleTargets>false</acceptsMultipleTargets>

               <requiredPrivilege>myCompany.datastorePriv.Manage</requiredPrivilege>

               <command className="com.mycompany.datastore.views.DatastoreActionCommand"/>

            </com.vmware.actionsfw.ActionSpec>

0 Kudos
Denis_Chorbadzh
VMware Employee
VMware Employee

The HTML client supports filtering actions based on the user's privileges.

However, you should use "<extendedPoint>vise.actions.sets</extendedPoint>" and "<privilege>" tag.

The "<requiredPrivilege>" is an internal implementation and should not be used because it may stop working in the future.

0 Kudos