25 votes

Backoffice Tweaking

 

Tool to tweak Umbraco 7 backoffice (BETA)

 

Features

  • Hide backoffice tabs

  • Hide backoffice properties

  • Hide backoffice buttons (Preview, Save, Actions)

  • Hide backoffice panels (Breadcrumb)

  • Hide property labels

  • Run scripts (javascript)

 

Description

This package allows you to hide some backoffice controls (tabs, properties, buttons, panels, ...) for certain User Types, Users and/or Content Types.

 

Installation

Install the package through the backoffice like any other Umbraco package. 

The installer will add new dasboard called "Backoffice tweaking" in the developer section of your backoffice

 

Configuration

There are two ways to configure the rules to hide or show backoffice controls:

  • By using the "Backoffice tweaking" dasboard (in the developer section)

  • By editing manually the config file:  ~/config/backofficetweaking.config

In order to hide any bakcoffice control (tab, property, button, panel, ...) you need to create a rule specifying which control(s) you want to hide or show, and for which user(s), which user type(s), which content type(s), ...

There are 6 different type of rules:

  • HideTabs

    - Enabled: To activate/deactivate the rule.
    - Names: Name (not alias) of the tabs to hide (comma separated list). [Mandatory]
    - Users: Users that you want to hide the control from (comma separated list).
    - UserTypes: User types that you want to hide the control from (comma separated list) .
    - ContentIds: Content node Ids you want to apply the rule to (comma separated list).
    ParentContentIds: Apply the rule to any children of the specified node Ids (comma separated list).
    - ContentTypes: Content types you want to apply the rule to (comma separated list).
    - Description: Description for the rule.

  • Example:

     <?xml version="1.0" encoding="utf-8"?> <Rules>  <Rule Type="HideTabs" Enabled="true" Names="Properties,content" Users="" UserTypes="" ContentTypes="customer" Description="Hide the 'Properties' and 'Content' tabs for the content type 'customer'" /> </Rules>

     

  • HideProperties

    - Enabled: To activate/deactivate the rule.
    - Names: Alias of the properties to hide (comma separated list). [Mandatory]
    - Users: Users that you want to hide the control from (comma separated list).
    - UserTypes: User types that you want to hide the control from (comma separated list) .
    - ContentIds: Content node Ids you want to apply the rule to (comma separated list).
    ParentContentIds: Apply the rule to any children of the specified node Ids (comma separated list).
    - ContentTypes: Content types you want to apply the rule to (comma separated list).
    - Description: Description for the rule.

  • Example:

     <?xml version="1.0" encoding="utf-8"?> <Rules>  <Rule Type="HideProperties" Enabled="true" Names="_umb_updatedate,image1,name" Users="john" UserTypes="writer" ContentTypes="customer" Description="" /> </Rules>



  • HideButtons

    - Enabled: To activate/deactivate the rule.
    - Names: 'save', 'preview' or 'actions' [Mandatory]
    - Users: Users that you want to hide the control from (comma separated list).
    - UserTypes: User types that you want to hide the control from (comma separated list) .
    - ContentIds: Content node Ids you want to apply the rule to (comma separated list).
    ParentContentIds: Apply the rule to any children of the specified node Ids (comma separated list).
    - ContentTypes: Content types you want to apply the rule to (comma separated list).
    - Description: Description for the rule.

  • Example:

     <?xml version="1.0" encoding="utf-8"?> <Rules>  <Rule Type="HideButtons" Enabled="true" Names="save" Users="John" UserTypes="" ContentTypes="" Description="" />  <Rule Type="HideButtons" Enabled="true" Names="preview" Users="" UserTypes="writer" ContentTypes="" Description="" /> </Rules>



  • HidePanels

    - Enabled: To activate/deactivate the rule.
    - Names: 'breadcrumb' [Mandatory]
    - Users: Users that you want to hide the control from (comma separated list).
    - UserTypes: User types that you want to hide the control from (comma separated list) .
    - ContentIds: Content node Ids you want to apply the rule to (comma separated list).
    ParentContentIds: Apply the rule to any children of the specified node Ids (comma separated list).
    - ContentTypes: Content types you want to apply the rule to (comma separated list).
    - Description: Description for the rule.

    Example:

     <?xml version="1.0" encoding="utf-8"?> <Rules>  <Rule Type="HidePanels" Enabled="true" Names="breadcrumb" Users="" UserTypes="" ContentTypes="" Description="" /> </Rules>

     

  • HideLabels

    - Enabled: To activate/deactivate the rule.
    - Names: Alias of the properties (comma separated list). [Mandatory]
    - Users: Users that you want to hide the control from (comma separated list).
    - UserTypes: User types that you want to hide the control from (comma separated list) .
    - ContentIds: Content node Ids you want to apply the rule to (comma separated list).
    ParentContentIds: Apply the rule to any children of the specified node Ids (comma separated list).
    - ContentTypes: Content types you want to apply the rule to (comma separated list).
    - Description: Description for the rule.

  • Example:

     <?xml version="1.0" encoding="utf-8"?> <Rules>  <Rule Type="HideLabels" Enabled="true" Names="_umb_updatedate,image1,name" Users="john" UserTypes="writer" ContentTypes="customer" Description="" /> </Rules>

     

  • RunScripts

    - Enabled: To activate/deactivate the rule.
    - Names: Name of the script to run (comma separated list). [Mandatory]
    - Users: Users that you want to hide the control from (comma separated list).
    - UserTypes: User types that you want to hide the control from (comma separated list) .
    - ContentIds: Content node Ids you want to apply the rule to (comma separated list).
    ParentContentIds: Apply the rule to any children of the specified node Ids (comma separated list).
    - ContentTypes: Content types you want to apply the rule to (comma separated list).
    - Description: Description for the rule.

  • Example:

     <?xml version="1.0" encoding="utf-8"?> <Rules>  <Rule Type="RunScripts" Enabled="true" Names="script1,script2" Users="john" UserTypes="writer" ContentTypes="customer" Description="" /> </Rules>


    There is no editor to add the scripts. You need to add them by editing the config file.
    Example of config file with scripts: https://our.umbraco.org/FileDownload?id=14379


IMPORTANT: (Applies for all rules)
   - Users: if this parameter is left empty then the rule will apply for all users
   - UserTypes: if this parameter is left empty then the rule will apply for all user types
   - ContentIds: if this parameter is left empty then the rule will apply for all content nodes.
   - ContentTypes: if this parameter is left empty then the rule will apply for all content types

IMPORTANT: Rules are IGNORED for all admin users.

 
IMPORTANT: If you hide tabs or poperties with validations (for instance mandatory fields), then it may happen that users will not be able to save contents, since they couldn't edit/fill hidden fields.

 

 

Credits:

 

 

Notes:

If you are looking for to hide/show backoffice tabs and/or properties dynamically when users select a value in a dropdown list or check a checkbox, then you might be interested in the 'uDynamic' package  (http://our.umbraco.org/projects/backoffice-extensions/udynamic)

 

Changelog:

  • v0.6.3 [2016-02-20]
    - [Feature] Possibility to define rules based on parent content Ids, thanks to Pavel Budík.
    [BugFix] Fixed virtual directory issues, thanks to @kipusoep

  • v0.6.1 [2015-04-06]
    - Remove properly all files when uninstalling 
  • v0.6.0 [2015-03-15]
    - IMPORTANT: Breaking change for the tabs. Now it uses the tab name instead of the tab's alias. Everything should work as expected except for the Umbraco tab "Properties". You need to put "Properties" instead of "Generic properties".
    - Performance improvements
    - Hide any control (tabs, properties, buttons, ...) by content Id. That could be useful to hide all buttons for a content node that only contains a listview, avoiding users to do anything but interact with the listview.
    - Hide property labels (if the property editor doesn't allow it).
    -
    Run scripts (javascript).

  • v0.5.0 [2015-03-08]  
    - Performance improvements
    - Doesn't use embedded resources anymore
    (https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/61145-Packages-only-work-in-debug-mode)

  • v0.4.0 [2015-01-25]  
     - New feature: Hide the 'actions' button
     - New feature: Hide the 'breadcrumb' panel
     - Bug fixed: Save button disappears after saving

  • v0.3.0 [2015-01-20]  
     - Some bugs fixed

  • v0.2.0 [2015-01-19]  
     - New feature: Hide the 'preview' and 'save' buttons
     - Some improvements
     - Some bugs fixed

  • v0.1.0 [2015-01-18]  
     - Initial release

 

Screenshots

Project owner

Alain

Alain

Alain has 520 karma points

Project Compatibility

This project is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
7.12.x (untested)
7.11.x (untested)
7.10.x (untested)
7.9.x (untested)
7.8.x (untested)
7.7.x (untested)
7.6.x (0%)
7.5.x (100%)
7.4.x (untested)
7.3.x (67%)
7.2.x (100%)
7.1.x (100%)
7.0.x (untested)
6.1.x (untested)
6.0.x (untested)

You must login before you can report on package compatibility.

Project Information

  • Project owner: Alain
  • Created: 18/01/2015
  • Current version 0.7.0
  • .net Version 4.0
  • License MIT
  • Downloads: 3615

External resources