locked
Allow users to view & edit his/her own file only RRS feed

  • Question

  • Hello all,

    Every month we upload a folder of excel files to a doc library. The way I upload is via a script I created that looks up the file name and then tags it to the appropriate owner. A file can have 3 to 4 'owners'. Owners is in this case are the users who are allowed to view/edit this file. It is a person,group column. The person before me created a complex system where user has to click on a region then another filter, then another and so on until they get to the file. It also required that we create a group for each user. It is difficult to maintain and the end users hate it. I want to have the user click on one page and only his/her files appear. I need some direction here. Can someone recommend a best practice for this scenario? Is there a web part that can do this automatically? Thanks


    Yes it was me, I ordered the code red!
    Monday, May 16, 2011 3:36 PM

Answers

  • Hi,

     

    I understand that you want to allow a user to view and edit his files only without creating  group for every user .Here are my  suggestions:

             1. Open doc library .Click Settings>Create View>Standard View.

             2.  Specify the name for the view .For example filter. And choose to make this the default  view.

             3.  Choose the column owner to display in the Columns field.

             4.  Choose ‘Show items only when the following is true’.

             5.  Set show the items when the column ‘owner’ ’is  equal to ’ ‘[me]’.

             6.  Click OK  to save the view.

    In this way the user who signs in  can only see the files that he owns .But if the user changes the default filter then he can see the files that he doesn’t own .

     

    Or  you can set those properties for the document library like this:

    SPDocumentLibrary onlyOwnLib = theWeb.Lists["DocLibName"]

    onlyOwnLib.WriteSecurity = 2;

    onlyOwnLib.Update();

     

    For more detailed information ,please refer to these sites:

    Edit only owned list items in Windows SharePoint Service 3.0: http://stackoverflow.com/questions/735015/edit-only-owned-list-items-in-windows-sharepoint-services-3-0

    Item level permissions: ‘only their own’: http://www.moss2007.be/blogs/vandest/archive/2008/12/19/item-level-permissions-only-their-own.aspx

     

    If there is anything unclear ,please feel free to ask.

     

    Thanks,


    Entan Ming
    • Marked as answer by Leoyi Sun Thursday, May 26, 2011 9:44 AM
    Tuesday, May 17, 2011 9:35 AM
    Moderator
  • Hi,

    You can use Item level permission.

    to Achieve this you have to stop inheriting permission from parent and create unique permission on doc lib.

    Hover mouse on doc lib file and you will get Manage permission option.

    Here you can add file's owner with Full Control so that he / she can manage it.


    Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
    • Marked as answer by Leoyi Sun Thursday, May 26, 2011 9:44 AM
    Monday, May 16, 2011 3:40 PM

All replies

  • Hi,

    You can use Item level permission.

    to Achieve this you have to stop inheriting permission from parent and create unique permission on doc lib.

    Hover mouse on doc lib file and you will get Manage permission option.

    Here you can add file's owner with Full Control so that he / she can manage it.


    Warm Regards, Pratik Vyas | SharePoint Consultant | http://sharepointpratik.blogspot.com/
    • Marked as answer by Leoyi Sun Thursday, May 26, 2011 9:44 AM
    Monday, May 16, 2011 3:40 PM
  • Hi,

     

    I understand that you want to allow a user to view and edit his files only without creating  group for every user .Here are my  suggestions:

             1. Open doc library .Click Settings>Create View>Standard View.

             2.  Specify the name for the view .For example filter. And choose to make this the default  view.

             3.  Choose the column owner to display in the Columns field.

             4.  Choose ‘Show items only when the following is true’.

             5.  Set show the items when the column ‘owner’ ’is  equal to ’ ‘[me]’.

             6.  Click OK  to save the view.

    In this way the user who signs in  can only see the files that he owns .But if the user changes the default filter then he can see the files that he doesn’t own .

     

    Or  you can set those properties for the document library like this:

    SPDocumentLibrary onlyOwnLib = theWeb.Lists["DocLibName"]

    onlyOwnLib.WriteSecurity = 2;

    onlyOwnLib.Update();

     

    For more detailed information ,please refer to these sites:

    Edit only owned list items in Windows SharePoint Service 3.0: http://stackoverflow.com/questions/735015/edit-only-owned-list-items-in-windows-sharepoint-services-3-0

    Item level permissions: ‘only their own’: http://www.moss2007.be/blogs/vandest/archive/2008/12/19/item-level-permissions-only-their-own.aspx

     

    If there is anything unclear ,please feel free to ask.

     

    Thanks,


    Entan Ming
    • Marked as answer by Leoyi Sun Thursday, May 26, 2011 9:44 AM
    Tuesday, May 17, 2011 9:35 AM
    Moderator
  • Thanks Entan

    I think that is what I'm looking for. I definitely do not want the users to open or download the other files. I'll read the articles and give it a shot.


    Yes it was me, I ordered the code red!
    Wednesday, May 18, 2011 1:30 AM