Quantcast
Channel: VMware Communities : Discussion List - vSphere Client SDK
Viewing all articles
Browse latest Browse all 2218

Privilege filtering and actions

$
0
0



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> 

                    &lt;icon&gt;#&lt;/icon&gt;



               <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>

                       &lt;privilege&gt;MyPrivilege.readwrite&lt;/privilege&gt;



               </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?


Viewing all articles
Browse latest Browse all 2218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>