Hi Marty, We could add an "actionPreFilter" for "actions" defined in the widgets which will filter out the buttons based on role.
There are preFilters already implemented for fields in a listView - we need to follow the same principle. We need to check for this filter where the buttons are built in the listView (look for "if (listViewData.actions) {" in listView.js). Hope this helps! Rashmi -----Original Message----- From: Marty Godsey [mailto:ma...@gonsource.com] Sent: Thursday, August 18, 2016 6:04 AM To: dev@cloudstack.apache.org Subject: RE: Hiding buttons based on role Not elegant but will work. This is not a one off to a degree. It's for my own servers but I will have at least 10-20 management server across the country in different zones but this allows me to "hide" some elements that won't be used until a more elegant way is created/available. Thank you for the direction Will. Regards, Marty Godsey -----Original Message----- From: Will Stevens [mailto:williamstev...@gmail.com] Sent: Wednesday, August 17, 2016 8:29 PM To: dev@cloudstack.apache.org Subject: RE: Hiding buttons based on role If I was doing a one off solution for my own use case with a limited scope, I would do it he following. Apply a CSS class to the <body> tag which corresponds to the role. Then I would use CSS to 'display:none' on the elements you want to turn off by referencing the body role class (and keep the permissions applied so if they unhide it won't work). It is not an elegant solution, but it will work. On Aug 17, 2016 8:19 PM, "Marty Godsey" <ma...@gonsource.com> wrote: > > Ok. Thank you. > > I think for the time being I will enable all the project APIs again > but deny access to create a project.. this way at least he API errors on page load go away. > > This is something I think would be nice to have in the permissions > area now since we have granular rules. A way to "turn off" certain areas of the GUI and/or ACS functionality. > > Regards, > Marty Godsey > > -----Original Message----- > From: Will Stevens [mailto:williamstev...@gmail.com] > Sent: Wednesday, August 17, 2016 8:10 PM > To: dev@cloudstack.apache.org > Subject: RE: Hiding buttons based on role > > Yes. Most of the UI is built using huge json structures. These will > need to be adapted to account for a user's role. I don't think there has been work done on that yet, but I could be wrong. > > @rohit, do you know if anyone has looked into this at all yet? > > On Aug 17, 2016 7:41 PM, "Marty Godsey" <ma...@gonsource.com> wrote: > > > With that being said, we are now getting into the area of UI > > modification to hide the button huh? > > > > Regards, > > Marty Godsey > > > > -----Original Message----- > > From: Will Stevens [mailto:williamstev...@gmail.com] > > Sent: Wednesday, August 17, 2016 7:23 PM > > To: dev@cloudstack.apache.org > > Subject: Re: Hiding buttons based on role > > > > My understanding is that the permissions can be set, but they > > currently do not modify the UI in any way. I believe what you are > > experiencing is the expected behavior. > > > > Cheers, > > > > Will > > > > On Aug 17, 2016 6:47 PM, "Marty Godsey" <ma...@gonsource.com> wrote: > > > > > Is it possible to hide a button based upon a role? As an example I > > > want to hide and deny access to the projects tab. I can modify the > > > role access to the API but the button is still present. In fact I > > > get an API error that states I don't have access. > > > > > > Regards, > > > Marty Godsey > > > > > > > > DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Accelerite, a Persistent Systems business. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Accelerite, a Persistent Systems business does not accept any liability for virus infected mails.