We have the requirement to allow only a single instance of dashboard settings for all users. This way an admin can dictate what is seen to all other users.

I have created a patch that allows an additional setting per dashboard, which defaults to the existing behaviour (everyone has their own settings).

Is this something that would be acceptable to be committed?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bulldozer2003’s picture

You can achieve the same result by unchecking 'movable' and 'closable' for every block on the layout page.

The only thing you cannot stop is users minimizing blocks, but I cannot imagine that is a major concern.

wiifm’s picture

The problem lies in the fact that some 'administrative' users (i.e. not user #1) still need the ability to move blocks around, add more, remove them etc. But when they do, these changes should be changed not just for them, but for everyone using that instance of the dashboard.

I hope this helps to explain why locking the blocks in place is not a solution here.

bulldozer2003’s picture

Can you give those users the administer homebox permission so they can edit the master layout?

I do understand what you want to do, but perhaps using pages, panels, and views would be a better option for you?

BTW, I am not a committer on this module so I cannot commit a patch, I'm just trying to help out.

wiifm’s picture

Unfortunately, the "master" layout is defined in code, this way it can be "restored" to if the administrators mess it up. Panels + Pages + Panels IPE is an option, but I feel a far more complicated one compared to the simplicity of homebox.

bulldozer2003’s picture

Another way might be to find a way to shoehorn the admin user's settings into each user's settings in the database or on page load. Then prevent new settings being saved for each user somehow.
See _homebox_get_user_settings() and _homebox_save_user_settings()

7drupel7’s picture

Issue summary: View changes

I just tested the patch and it seems to work perfectly. Maybe we can instead of hard code the principal user, just create a new select field with all Administrator users, then in the code just find the uid of that selected user. In this way could be more generic ?

drumm’s picture

Status: Needs review » Closed (works as designed)

Panels would be the best thing to use for this. It is built to slice up the page into panes and put more than just blocks in the pane, configured one way for everyone. Homebox isn't designed for that use case.