Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Hide "Lists and Libraries" inside "Add a web part" ?

  Asked By: Jennifer    Date: Dec 06    Category: Sharepoint    Views: 4613

How do you hide web parts and data list web parts from a user?

We want to allow people to use the "Personalize this Page" feature to
move, minimize, close and re-add web parts to their hearts content.
The problem is that enabling the "Add/Remove Personal Web Parts"
Personal Permission allows the user to see a large list of irrelevant
and confusing web parts.

I know it is possible to secure the Web Part Gallery so that none of
them appear to the user (by removing permissions). Remove permission
from the list, and you can still add permissions to individual items.

It does NOT seem possible to remove the "Lists and Libraries" from the
"Add a web part" web part selector (the pop-up or advanced pane). For
example, how do we hide lists like "Pages," "Images," and "Style
Library" from annoying the user while adding web parts without making
the lists inaccessible for their proper use?

I seem to remember that it was possible to hide the display of lists
in SharePoint 2003, but I haven't seen anything related to that in a
LONG time... I even forgot how it was done.



2 Answers Found

Answer #1    Answered By: Yvonne Rodriquez     Answered On: Dec 06

I just found an answer, but I'd still like to know if there is another

Here is how you hide  lists from everyone (including the admins).

Go into SharePoint Designer, and change the Properties of each list  to
"Hide from browsers." This will remove  it from the "All Site Content"
page, and the "Add a Web Part" pop-up  and the "Add Web Parts" pane.
This will NOT hinder the use of the list, nor will it restrict a user
who knows the Url (/Lists/Contacts) from view the list items  (except
that it does seem to crash Internet Explorer rather regularly :-( ).

If you want to automate the update, use this code:

SPSite site = new SPSite(siteUrl);
foreach (SPList list in site.RootWeb.Lists)
if (!list.Hidden)
Console.WriteLine("Hiding: " + list.Title);
list.Hidden = true;

This removes all the entries from the Add Web Part list, but my IE
browser is now crashing (not FireFox) trying to get to some lists...
um... repeatedly, but not always (ie: paste the url in a new browser
window, and it usually works).

Answer #2    Answered By: Elisha Abbott     Answered On: Dec 06

The only way to hide  lists from the All Site Content page  is using
SharePoint Designer or the API. There isn't any browser-based way to do
this. Sounds like a great opportunity for a Feature.

Didn't find what you were looking for? Find more on Hide "Lists and Libraries" inside "Add a web part" ? Or get search suggestion and latest updates.