Hi,
i just added a new "hidden" attribute to make such things easier. I also added a new "thruk_user" variable which
makes the additional rest api call unnecessary.
See
https://github.com/sni/Thruk/commit/501c7524eb92dabc9130c7908b4d1edac71053e7
There is also an example.
Cheers,
Sven
On 12.12.22 17:36, Anand Sampatsing wrote:
> Hi Sven,
>
> Thanks for your super fast reply.
> In Thruk 2 the action_menus were added "onload" after that (if i'm correct) status-header.ssi was loaded/run.
> My js in status-header.ssi checked if there is a onmouseover in the (host)statusTable.tr . if not, this must be a ro user.
> Because action menu items were already present onload my js would find all "Edit notes" and remove it.
>
> Thruk3 loads action menus dynamically (is my understanding), the menus are not present onload but only become available onclick of the dropdown icon.
> Any suggestions on how to tell js not to show "Edit notes" if ro user.
> Perhaps something with html raw
> { "icon":"uil-document-info",
> "html":......
> },
>
> Not sure if "action_menu_apply" could be used here.
>
> Many thanks,
> Anand