Corey Burnett
Corey Burnett

Reputation: 7340

In Sitecore how can I hide certain states in the user's workbox?

Let's say I have a Workflow in Sitecore that has the following states:

I want a user in the IT group to only see items that are in the "Review by IT" state when they go to their Workbox. Right now I am doing this by denying the Read permission to all other states. This works fine. An IT user will only see items that are in their state.

However, this has an interesting side effect. Because the IT user does not have Read access to the other states when he views the history for that item it says the following:

Moved from ? to ? on 10/27/11 Moved from ? to Review by IT on 10/27/11

It seems like the user can not see the names of the other states because he does not have Read permissions. Is this expected behavior? Is there some other way to keep states out of a user's Workbox?

Upvotes: 0

Views: 570

Answers (1)

Alex Shyba
Alex Shyba

Reputation: 1262

What you can try doing is override Sitecore.Shell.Applications.Workbox.WorkboxHistoryXmlControl implementation.

  1. Copy WorkboxHistory.xml from \sitecore\shell\Applications\Workbox to \sitecore\shell\override
  2. Create a class inherited from Sitecore.Shell.Applications.Workbox.WorkboxHistoryXmlControl and override OnLoad by wrapping it in a security disabler:

    protected override void OnLoad(EventArgs e) { using(new SecurityDisabler()) { base.OnLoad(e); }}

  3. Change reference to your new implementation within \sitecore\shell\override\WorkboxHistory.xml:

    ...inherits="Custom.Workbox.WorkboxHistoryXmlControl,Custom">

I have not tested it but it should work.

Upvotes: 1

Related Questions