Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

Hiding webparts in wss sites

  Asked By: Krysta Stark         Date: Apr 01, 2010      Category: Sharepoint      Views: 228
 

I wanted to know if there is any mechanism available in wss through
which i can restrict a webpart to a group of users in wss site i.e. the
users who do not have access to that webpart should not even see it in
their preview of their site. I tried creating a site group and added
members to it and gave the permissions on the webpart. But, other
members who are not part of my site group are also able to see the
webpart, although they are getting access denied when they are trying
to edit it.

Tagged:          

 

2 Answers Found

 
Answer #1       Answered By: Edgardo Atkins          Answered On: Apr 01, 2010       

There is no built-in security model in WSS to support this. You would need to
code the individual web parts themselves to do so.

 
Answer #2       Answered By: Kamal Mayachari          Answered On: Apr 01, 2010       

The only way I've found to do this is through custom programming. You can use
the PreRender event handler to set the frame to "None", set the order to the
bottom of the page (e.g. 99), and add conditional logic in the RenderWebPart
method to only write the contents if the user is authorized.

I've used a routine to check the user's AD group  membership to display the web
part, but you could also check their site-group membership.

One Note: in my experience, neither the Visible or IsVisible properties are
reliable ways to make a web part  disappear, hence the use of the frame (?)
property in the PreRender event handler.

 
Didn't find what you were looking for? Find more on Hiding webparts in wss sites Or get search suggestion and latest updates.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].