I have recently started using Open Ondemand version 3 and exploring the new capabilities it offers.
I find the profiles functionality very interesting and we are trying to apply it to make a number of differentiations in the Dashboard.
My question is if there is a way to assign a default profile for all users and then manually assign to X users a specific profile, let’s say for example one with access to metrics data from XDMod or Grafana as if it were an administrator.
Is there any way to replicate this behavior?
Best regards .
Hi and welcome! And sorry for the delay, we’ve been on vacation and summer camps and so on.
I think you have 2 choices, though I think they both rely on the order of the files which may not be guaranteed at this time (I’ll file a bug after I write this).
Use FACLs to control the files in
/etc/ood/config/ondemand.d. So let’s say you have these 2 files that define these 2 profiles. Use FACLs on the second file
admin.yml so that only users in some group can read that file. Again order here matters so you need to be sure that default is read first and admin (if it can be read) is read second.
All the files in can be rendered in ERB. So you could do something like what’s below, so the resulting YAML that’s read is different depending on the if block.
<%= if some_logic_statement %>
<%- else %>
<%- end %>
I filed the ticket upstream around file ordering. When we release the next patch version of 3.0 it’ll be there.