WSS3 hide web part if permissions don't exist
I have several web part pages that managers will be using as a company dashboard. The problem that I have is that instead of just not showing up to read only users, the web parts show an access denied error. Is there a way to simply hide the web part if the user does not have the appropriate user permissions?
I am using Sharepoint Services 3.
Any suggestions are appreciated, thanks,
Jason
모든 응답
I know Audiences themselves don't exist in WSS 3, but you might still be able to apply audience filtering on Web Parts w/ SharePoint groups (done by modifying the properties of the web part)
Hi,
I've developped a WebControl able to hide unauthorized WebPart. You can download it from http://www.bewise.fr/download/toolbox/Bewise.SharePoint.RoleViewerManager.zip
The .zip file contains a "Read Me.txt" explaining how to install it.
Laurent Cotton (Aka Suchii)
MCTS / MCSD.NET / MCT
blog : http://sharepoint.over-blog.fr/
Hi Suchii,
Thank you for the file. I attempted to use GACUtil to import the dll however it failed citing an unknown error. Any suggestions?
Thanks,
Jason- Hello Suchii,
I’ve tried to download your WebPart and I can not succeed.
The link is not more available.
Can you tell me where has been moved?
Thank you,
Gregoire
- Jason, as an alternative, you could also add a "SPSecurityTrimmedControl" around a special web part zone on your page layout(s). You'll want to create a web part zone on your page layouts that looks something like this:
In this example, I have a web part zone inside the security-trimming control that only allows users with the "ManagePermissions" permission-level to see any web parts within that web part zone. This is an OOTB fix that should be relatively easy to implement.<SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server"> <WebPartPages:WebPartZone id="zone1" runat="server" title="Top Zone" /> </SharePoint:SPSecurityTrimmedControl>
You can read more about the different permission levels you can use here: http://codename-srini.blogspot.com/2009/04/spsecuritytrimmedcontrol-and.html
Kyle

