MSDN > 論壇首頁 > SharePoint - Design and Customization > WSS3 hide web part if permissions don't exist
發問發問
 

問題WSS3 hide web part if permissions don't exist

  • Tuesday, 31 July, 2007 20:15JasonD240 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    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

所有回覆

  • Wednesday, 1 August, 2007 20:47Rich McGuire 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    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)

  • Friday, 3 August, 2007 7:19Suchii _www.bewise.fr_MVP使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    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

    www.bewise.fr

    blog : http://sharepoint.over-blog.fr/

     

  • Friday, 3 August, 2007 15:10JasonD240 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

    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

  • Friday, 3 July, 2009 20:39grigb 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    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

  • Monday, 6 July, 2009 14:50Kyle Schaeffer 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     包含代碼
    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:

    <SharePoint:SPSecurityTrimmedControl PermissionsString="ManagePermissions" runat="server">
         <WebPartPages:WebPartZone id="zone1" runat="server" title="Top Zone" />
    </SharePoint:SPSecurityTrimmedControl>
    
    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.

    You can read more about the different permission levels you can use here:  http://codename-srini.blogspot.com/2009/04/spsecuritytrimmedcontrol-and.html


    Kyle