Is it possible to make Sugar Dashboard Uneditable for Regular Users?

 Is it possible to make Sugar Dashboard Uneditable for Regular Users?

Parents Reply
  • Hi

    you need to extend the view

    ({
       extendsFrom:'DashboardHeaderpaneView',
       editClicked: function(evt) {
          // validate user
          if( app.user.get('type') != "admin" ){
             // here you can show an alert
             app.alert.show('message-id', {
                level: 'error',
                title: "You aren't admin"
             });
          } else{
             this._super("editClicked", [evt]);
          }
       }
    })

    It's possible that you need validate the current module 

    ...

    if( app.user.get('type') != "admin"  and this.module=="Home")

    ...

Children