Remove edit dashlet function

Hi All,

What I wish to accomplish today is to remove/restrict access to the edit function on dashlets on the main dashboard. Once the filters for the dashlets have been set I need to block everyone from editing their dashlet so they can’t mess things up ! Basically remove/block the pencil icon from all dashlets! (can’t upload pic…sorry!)

Thanks!

I don’t know the exact answer, but on a quick inspection the action you need to remove is called configureDashlet, so look in this search:

https://github.com/salesagility/SuiteCRM/search?p=3&q=+configureDashlet&type=&utf8=✓

You will probably want to ignore all the references in the “modules” directory, since they are module-specific, and try to look for a generic fix in one of those references in the “include” directory. You should be able to change only in one place, and affect all dashlets… I hope.

But, if you don’t mind my saying, consider not doing this to your users. The dashboard being user-configurable is a great thing for user productivity. I would really hate working at a company where somebody would lock my dashboard for me.

I understand there might be reasons to need this, maybe you have complicated dashlets and then users delete them by mistake… but if you can possibly avoid it, maybe let them do changes if they can keep them under control, and then have a “dashlet reset” procedure that users can ask you to do, to reinstate your default state, if they mess things up. Tell them it’s their responsibility to keep things in place, or get a reset.

There are add-ons to manage dashboards that might help you achieve a more balanced company policy. You can also have a look here to learn how dashlets work under the hood (and how easy the dashboard reset would be, just copy a database field from one user to another):

https://suitecrm.com/suitecrm/forum/suitecrm-7-0-discussion/15841-lost-dashlets-and-tabs-for-one-user#53085

You are awesome bro ! What I was looking for was the configureDashlet Function in include/MySugar/MySugar.php. Commented that out and now edit button (aka the little pencil icon … for easy find references ) does nothing !
I know I can mitigate all issues by employee training… but then again you don’t have my users… And also I will set up the filters for the dashlets prior to disabling them so they will not miss anything. One of the reasons I do this is because some accounts are shared and some users will edit the view/order/etc of the dashlets which could cause trouble/confusion for others!

Once again thanks for your help!

Again, this looks like something you could improve - there’s really no reason to need sharing accounts, SuiteCRM doesn’t charge for the number of users…

The rest you can achieve with permissions, security groups, etc.

But ok, these are only pointers and suggestions, it’s true “I don’t have your users” :slight_smile:

Good luck!

This is resolved with the System Setting:
Prevent user customizable Homepage layout:
Mark it with an X and save it and the Actions button goes away.

Does it works any more? I am trying the same action buttons are still coming along.

It does in my version which is 7.11.15

If you want to remove the edit function from a single custom dashlet, you can add the following line in the .php file…
$this->isConfigurable = false;

This removes the edit/pencil icon from the displayed dashlet and keeps users from making any changes.

Dianna