I have document library & 3 groups(AdminGroup,Reviewer,Distributor). I have already give a permission on groups, AdminGroup has Full Control, Reviewer has Reader & Distributor has None :
roleDefinition = web.RoleDefinitions.GetByType(SPRoleType.Administrator); // Admin roleDefinition = web.RoleDefinitions.GetByType(SPRoleType.Reader); // Reviewer roleDefinition = web.RoleDefinitions.GetByType(SPRoleType.None); // Distributor
Now, I want to give permission on document library that :
- If anyone upload document it's Draft version should only visible to Reviewer,Admin & owner of the document. Distributor user can't see it if he is not owner.
- Reviewer Group's user can only view/edit the document & publish it but can't Approve/Reject it.
- Admin has full control. He can Add/Edit/View & Approve/reject the document.
- Distributor Group's user can only view his own documents & Approved documents.