I like to be able to hide my list and the list should only be visible to the person who created it. I've created a custom action -> ribbon to perform that action. Right now when the ribbon button is clicked, the list will be set to hidden using Client Object Model like this :-


But how do I make this list visible only to the creator of this list, because once I've hide it, it will not be visible at all and the only way to show this list again is via SharePoint Designer.

Could you guys please help me?

  • Is it an option to break inheritance of rights? I mean that you create new rights for this list to kick off everybody else? Feb 17, 2012 at 14:02

2 Answers 2


In you scenario any user can access to this list, if this user know list url. I think that the best way is to use Unique Permissions for the list. You can set it like this:

public static void AssignPermissionsToItem(SPWeb web, SPSecurableObject secObj, SPPrincipal obj, SPRoleType roleType)
    if (!secObj.HasUniqueRoleAssignments)
        secObj.BreakRoleInheritance(false, true);

    SPRoleAssignment roleAssignment = new SPRoleAssignment(obj);
    SPRoleDefinition roleDefinition = web.RoleDefinitions.GetByType(roleType);


secObj - SPList, obj - SPUser

In this case the link to the list is displayed for users that have rights.

  • Thanks, but this is not gonna solve my problem. And my question was about using the client object model - javascript and not the server object model (I've already have the code for this). If you were to give me this in javascript I would have tick this as answered (because I was really struggling with it). Thanks anyway and I really appreciate your effort. Feb 20, 2012 at 9:14
  • I think that you can not use js for this issue, because the user should has administarator rights to set permission to the list. But the common users does not have this rights. In this case you should elevate privileges for the user. But I don't thik that it is possible in JS :(
    – Alexander
    Feb 20, 2012 at 10:40

Apparently what my requirements is not achievable with SharePoint permission (as far as I know, please correct me). The requirement is to hide the Looked up list. E.G. I created two custom list, one is named States and the other one is named Country. States is set to LookUp the Country list. My pm asked me to hide the Country list. I'm using the the Contribute permission set for most of the users because I want them to Add new State item. Even if I create my own permission set with these settings:- View Item, View Pages and Open (and then break inheritance on the List level and remove the Contribute permission level and set this permission to the Member group ), I still can see my Country list (I can't add new item to that list though). So my solution is to create an application page that will let the user with the Full Control permission to hide or unhide those lists.

Thanks for trying to help me, really appreciate it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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