24 votes

Attackmonkey Tab Hider

New in Version 1.5:

- fixes a bug where the wrong tab was selected on saving.

New in Version 1.4:

- added code so that the properties tab can now be hidden, and if ALL of the tabs are hidden on a page, an alert is displayed on the page to explain that there is nothing for the user to edit on this page.

New in Version 1.3:

- added a config option to only show all of the tabs to the root (original admin) user. If you set this to true, you can include the Administrator group in your hide rules, but the root admin (the one you set up when you installed Umbraco) will still be able to see everything.

New in Version 1.2:

- refactored the way tabs are hidden, it's all done client side now, as hiding the tabs server side didn't work with the pickers (media, content and member) or the true/false datatype.

- added config value "disableHiddenValidators" (can be true or false), to allow you to set whether the validators for the hidden tabs still fire or not (ie if you want to prevent publishing even though the user can't see the tabs), the config setting is set to true by default

- improved the logic for when tabs are hidden to ensure the first visible tab is always selected

 

New in Version 1.1:

- added file watcher to config, so updates to tabHider.config don't requie app pool restart

- fixed issue where hiding first tab on page resulted in empty box

 

What is it?

This is an extension to the back end that allows you to hide tabs on your content pages from certain user groups. You can configure tabs and specify which user groups cannot see the tab. If you wish, you can make a rule only apply to certain document types. I've designed it to be pretty quick and easy to setup and configure, and I have some extra features planned already, such as the ability to specify users who are excluded from the rules (watch this space).

This is an initial release for a project I'm working on that is still in development, so it hasn't been extensively tested in a live production enviroment yet. Although this plugin does not perform any destructive actions, please be aware that it's only in its early stages, test it thoroughly on your site before using for live!

 

How Does it Work?

 This package adds a new DLL (AttackMonkey.TabHider.dll), and a new config file (tabHider.config). Currently, the config file allows you to set up rules for tabs, and lets you specify which user groups don't get to see the tab, and optionally you can make the rule only apply to certain DocTypes. Note: these rules are ignored for members of the Administrator group.

The format for the rules is as follows:

<add  tabName="[name]" hideFrom="[user groups]" docTypeAliases="[doc type aliases]" />

tabName - this is the name of the tab that you want to hide.

hideFrom - this is a comma separated list of user groups that you want to hide the tab from.

docTypeAliases - this is optional, and is a comma separated list of the docTypeAliases of the document types you want to apply this rule to. If you omit this value or leave it empty, the rule will apply to all docTypes.

The following rule hides a tab called "SEO" from writers and editors, on all pages in the back end:

<add  tabName="seo" hideFrom="writers,editors" />

The following rule hides a tab called "tracking code" from writers, but only on the homepage doc type:

<add  tabName="tracking code" hideFrom="writers" docTypeAliases="contentHomepage" />

 

Issues to be Aware of:

If you hide a tab with validation controls in it, be aware that those validation controls will no longer fire (unless you set them to fire in the config), as the panel isn't accessible. This shouldn't be an issue, as they couldn't fill in the page anyway as they don't have access to it, but it is one to watch out for in a few cases.

This currenty only works for content. I could expand the plugin to handle media as well if enough people want it.

 

If you have any feedback, feature requests or have found any bugs, please use the forum below, I'll try and get back to you as quickly as I can!

Package owner

Tim

Tim

Tim has 2675 karma points

Package Compatibility

This package is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
Version 8.18.x (untested)

You must login before you can report on package compatibility.

Previously reported to work on versions:

Package Information

  • Package owner: Tim
  • Created: 12/07/2010
  • Current version 1.5
  • License MIT
  • Downloads on Our: 6K