3

I have a customer which wants their draft documents to be visible only to their authors. Moreover, the published version should be visible to everyone. However, they do not want to go through the content approval workflow. Any ideas on how this can be done?

John Doe can see his own document.doc (v0.1, v0.2 ++) Then he clicks publish, and the document is published without content approval. Everone can see document.doc (v1.0, v2.0 ++)

2

Since the Published and Draft documents have the format:

  • {MajorVersionNumber}.0 for Published
  • {MajorVersionNumber}.{MinorVersionNumber} for Drafts

for your scenario the View could be created with the following filters:

  • By Published documents that corresponds to [Version] CONTAINS .0

  • By Author [Created By] = [Me]

enter image description here

enter image description here

0

This should be possible from the List settings -> Versioning Settings. Under the Draft Item Security you should be able to set this to 'Only users who can edit items' for the questoin 'Who should see draft items in this document library?'.

  • The problem is that I only want the author to see the draft of his document, and not everyone with contribute permissions. I am missing that option from the versioning settings. – user8920 Aug 27 '13 at 7:55
0

That final option only becomes available if you turn on approval. However, you do not have to use a workflow process to achieve approval. If there is no workflow then I would recommend your approvers adding an alert to advise when something needs approving as otherwise they will get no notification.

0

It seems like this issue can be solved by adding an eventReceiver to the document library, which automates the content approval. If the status of the document is "pending" it's set to "approved". In this way, we can get the hidden draft functionality as well as the visibility of the published versions without having a separate approvers group for this job. Haven't gotten the time to test various scenarios on this solution, so if anyone can see a major flaw in this, please let me know :)

0

You can set Draft Visibility of document library when you create it programmatically. Here is the code :

#region Create Document Library

SPListTemplate listTemplate = web.ListTemplates["Document Library"];

SPDocTemplate docTemplate = (from SPDocTemplate dt in web.DocTemplates where dt.Type == 100 select dt).FirstOrDefault();

Guid guid = web.Lists.Add("Document Library Name", "Description", listTemplate, docTemplate);

SPDocumentLibrary library = web.Lists[guid] as SPDocumentLibrary;

library.DraftVersionVisibility = DraftVisibilityType.Author;     // <<<<< DRAFT VISIBILITY

 #endregion

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.