Show webparts for all users

To my big surprise, sharepoint users, who are only members of custom site groups, can’t see all webparts. This is apparently because the webpart gallery is stored in a list, and the list doesn’t inherit security for the portal.

To enable all users to see all webparts, edit the webpart gallery list, so it inherits security from the portal. That is actually quite hard to do, so here follow an easy walk through 🙂

 Before you start, open your favorite text editor, and do like this. 

  • Open the portal, and go to site settings
  • Click manage security and additional settings
  • Click manage webpart gallery 
  • Click modify settings and columns
  • Look at the the url. It looks something like this: http://Server/_layouts/1033/listedit.aspx?List={GUID}
  • Copy the GUID from the url, and paste it into your open text editor.
  • Open a new browser, and type in the following url, and press enter: http://Server/_layouts/1033/ShrOpt.aspx?obj=GUID,doclib, where server, is your server name, 1033 your language code, and GUID should be the GUID you put into your text editor earlier.
  • On the page that now appears, you can change the security permissions. Click inherit permission from parent web site.

All done. Now all users have access to the webparts, such that it corresponds to the custom sitegroups security settings.

Why it is not implemented like this from the beginning beats me. It could be because of some security reasons. If you are worried about the security, you can now change the permissions for all custom sitegroups to View items. Of course, then users who are only members of custom sitegroups that have been created after these actions, don’t have access to all webparts.

An alternative solution to the problem, could be to add a cross sitegroup to the list with view permissions, and then add all custom sitegroups to this cross site group.

Embed media players in your website

In the process of creating a web based media centre, I need to be able to play media in a website. It is surprisingly easy with activeX components, and much easier than using the difrent players in a window based application. If you want to use MS media player in your web site, paste in the following code:

<OBJECT\r\nID=”mediaPlayer”
CLASSID=”CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95″
CODEBASE=http://activex.microsoft.com/activex/controls/

mplayer/en/nsmp2inf.cab#Version=5,1,52,701
STANDBY=”Loading Microsoft Windows Media Player components…”
TYPE=”application/x-oleobject”>
<PARAM NAME=”fileName” VALUE=”example.avi”>
<PARAM NAME=”animationatStart” VALUE=”true”>
<PARAM NAME=”transparentatStart” VALUE=”true”>
<PARAM NAME=”autoStart” VALUE=”true”>
<PARAM NAME=”showControls” VALUE=”true”>\r\nOBJECT>

Likewise for Quicktime. Paste in the following:

<OBJECT CLASSID=”clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B”
WIDTH=”160″
HEIGHT=”144″
CODEBASE=”http://www.apple.com/qtactivex/qtplugin.cab”>
<
PARAM name=”SRC” VALUE=”sample.mov”>
<
PARAM name=”AUTOPLAY” VALUE=”true”>
<
PARAM name=”CONTROLLER” VALUE=”false”>
<
EMBED SRC=”sample.mov” WIDTH=”160″ HEIGHT=”144″ AUTOPLAY=”true”
CONTROLLER=”false”
PLUGINSPAGE=”http://www.apple.com/quicktime/download/”>
<
EMBED><OBJECT>

The parameters should be self explaining.

An example of a webpage using the code, can be seen here: http://mptest.clauskc.net/

Removing saved windows passwords

Working with sharepoint 2003, you often have to test functionality for different users.

Doing so, you will have to remove the saved window password (That is, if you have accepted to save it).

 The idea with windows remembering user credentials is that when you are logged into windows, you shouldn’t have to remember user credentials for everything else. Whether that is a good idea seen from a security perspective is another issue.

But anyway. Howto remove them. Click start->run and type: rundll32.exe keymgr.dll, KRShowKeyMgr, and then you will be presented with an admin view from where you can delete the passwords and usernames.

New blog

Hello, and welcome to my blog.

You can read what it is all about, in the about section. But for now, it will be mostly sharepoint 2003, since that is what I am working with at the moment 🙂

Developing to sharepint 2003 can at times be a challenging task, since it lacks documentation, and can sometimes come with useless error messages, but I guess you can read more about that here later 🙂

Enjoy