Actually, i have asked Sitecore support about this a while ago, they gave me the following solution:
Items are available for approving in Workflow when the user has 'Read' and 'Write' access rights to the item and 'WorkflowStateWrite' access right to the workflow state.
These requirements are specified by design. I'll try to register a wish about allowing to achieve this behavior out of the box.
Now you may workaround this design decisions by using and customizing Workbox.
You can try to use the following solutions:
- Allow the 'Write' access right to the item and the 'WorkflowStateWrite' access right to all the Worflow states of a current workflow, and deny the access to the 'Content Editor' (or the 'Page Editor') for the specific user or role.
- Deny 'Write' access to the item for the specific user or role and customize the 'GetItems' method of the WorkboxForm class (Sitecore.Shell.Applications.Workbox.WorkboxForm, Sitecore.Client).
This will allow the Workbox to retrieve items which the current user does not have write access rights to.
For example:
private DataUri[] GetItems(WorkflowState state, IWorkflow workflow)
{
ArrayList list = new ArrayList();
DataUri[] items = workflow.GetItems(state.StateID);
if (items != null)
{
foreach (DataUri uri in items)
{
Item item = Context.ContentDatabase.Items[uri];
if (Sitecore.Context.User == "sitecore\Specific User")
{
if (((item != null) && item.Access.CanRead()) && (item.Access.CanReadLanguage() && item.Access.CanWriteLanguage()))
{
list.Add(uri);
}
}
else
{
if ((((item != null) && item.Access.CanRead()) && (item.Access.CanReadLanguage() && item.Access.CanWriteLanguage())) && ((Context.IsAdministrator || item.Locking.CanLock()) || item.Locking.HasLock()))
{
list.Add(uri);
}
}
}
}
return (list.ToArray(typeof(DataUri)) as DataUri[]);
}
Note,that you may also want to hide "Open" item in Workbox or override it's behavior. I can see two ways to achieve this, i'll provide instructions for each approach so you can choose which to use.
- Open the WorkboxItem.xml file (website/sitecore/shell/Applications/Workbox/WorkboxItem.xml) and comment out the following line:
<WorkboxCommand Icon="Applications/16x16/document_view.png" Header="Open" Command="$Click"/>
But in this case the 'Open' button will be hidden for all users.
- You need customize the logic of the 'Open' method (Sitecore.Shell.Applications.Workbox.WorkboxForm class).
For example:
protected void Open(string id, string language, string version)
{
string sectionID = RootSections.GetSectionID(id);
UrlString str2 = new UrlString();
str2.Append("ro", sectionID);
str2.Append("fo", id);
str2.Append("id", id);
str2.Append("la", language);
str2.Append("vs", version);
var application = "/sitecore/content/Applications/Content editor";
Item item = Client.Site.Database.Items[application];
if (item == null) SheerResponse.Eval("alert('You do not have access to the Content Editor')");
else
Windows.RunApplication("Content editor", str2.ToString());
}
Please take into account that these all code samples are just examples and maybe it is better to give users an ability to edit content - but only some allowed parts.