As part of my plugin, I want certain actions to only be available to users with specific custom privileges. For example I only want to allow users that have my custom write privilege to be able to add new instances of my object to my inventory. I tried the following:
<!-- Create MyObject -->
<com.vmware.actionsfw.ActionSpec>
<uid>com.mycompany.vcenterWebClientui.myObject.createMyObject</uid>
<label>#{myObject.createAction}</label>
<icon>#</icon>
<delegate>
<className>com.vmware.vsphere.client.htmlbridge.HtmlActionDelegate</className>
<object><root>
<!-- execute the action on client-side (html view in a modal dialog) -->
<actionUrl>/vsphere-client/vcenterWebClient-ui/resources/createMyObject.html</actionUrl>
<dialogTitle>#{myObject.createAction}</dialogTitle>
<dialogSize>500,300</dialogSize>
</root></object>
</delegate>
<!-- All context-less actions should be marked as private to prevent them
from showing up in all menus.-->
<privateAction>true</privateAction>
<metadata>
<privilege>MyPrivilege.readwrite</privilege>
</metadata>
</com.vmware.actionsfw.ActionSpec>
This doesn't seem to work. My create action item doesn't appear and I also don't see getData() in my Adapter class being called for the
grantedPrivileges property.
How can I have certain actions appear to the user for my Custom objects using custom privileges?