Johan 的个人资料Min Blogg om Sharepoint ...照片日志列表更多 工具 帮助

日志


6月17日

Angående Anonymous Audiences in MOSS

  Anonymous Audiences in MOSS
In a past project, I needed to be able to create an audience in MOSS that would apply only to anonymous users in an SharePoint site configured to use forms-based authentication.  Additionally, anonymous users could not access a page in SharePoint if the page contained a web part that was configured with an audience.

I noticed that the RuntimeFilter tag in the web.config file referenced the AudienceManager class: 

<RuntimeFilter Assembly="Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Class="Microsoft.Office.Server.Audience.AudienceManager" BuilderURL="audience_chooser.aspx" />

Using Reflector, I was able to determine that this class was responsible for both supplying the audience controls in the tool part window and for determining whether or not the user was in the audience configured for the web part. 

Normally, these controls are displayed when a web part is edited:

image

But after writing a wrapper for the AudienceManager class, I was able to add an additional checkbox to allow the user to specify that only anonymous users should see the webpart:

image

Now, when the user checks the check box, only anonymous users will see the web part.  I also made an additional change to workaround the problem of anonymous users not being able to see pages that had web parts configured with audiences.

To implement the same functionality, you will need two classes:  one that implements the Microsoft.SharePoint.WebPartPages.IRuntimeFilter2 interface and one that implements the Microsoft.SharePoint.WebPartPages.IToolPaneControl interface.  The IRuntimeFilter2 interface is used to determine if the current user is in a particular audience when the web page is rendering and the class you create will need to be configured in the RuntimeFilter tag in the web.config file.  The IToolPaneControl interface is used to display the audience control in the tool pane when the web part is edited.

You can download the code I used here.

Technorati Tags: ,

6月9日

Slam

  Med hjälp av detta program kan du få sharepointen att hitta info från andra databaser direkt in i sharepoint

AW Systems - Technology Partners
http://www.awsystems.com/contentslammer/

 

6月5日

WSS Content Import/Export Wizard - Home

 Detta verktyg är riktigt bra när man skall kopiera innehåll från en sharepoint server till en annan

http://impex.codeplex.com/

 

ImpEx. WSS Content Import/Export Wizard - Home
WSS Content Import/Export Wizard

Office 2007 tips

 
Här kommer lite office tips
 
Hur man flyttar in arbetsflöden i ett word dokument ett måste tycker jag :-)