Cockpit: hide configurations to Users

Continuing from:

@giacomo What do you think to add this in nethserver packages and show the same error (with a button Back to Dashboard) on all pages? It can complete the work NethServer team is doing on Cockpit.

beforeRouteEnter(to, from, next) {
    next( vm => {
          function(success) {
            try {
              success = JSON.parse(success);
            } catch (e) {
            if (success.applications.indexOf(to.path.substring(1)) == -1) {
              vm.view.isAuth = false; # show error form
              vm.view.isAuth = true; # show normal page
          function(error) {

Have a nice week! :slight_smile:

1 Like

I can’t tell from the code how the UI will behave.

Could you please describe the implemented behavior? Maybe a screenshot could help here :wink:

IIRC if you are not allowed you are redirected to the dashboard, but except for the terminal, the software center, you should not see the back button. Like giacomo, I am curious of what you would like to implement.

1 Like

I will try to post here a screen asap