How I simplified the Users and Group UI – Listing Users

Listing users in my page was actually the easiest bit of the whole solution. In the ASP of my page, I added:

<SharePoint:ListView id="UserListView" ListID="UserInfo" runat="server"/>

And my page showed:

ListView

This is a SharePoint ListView, and the id and ListID appear to be ‘magic’ values. If set as above, the web part will display the users in the group specified by the MembershipGroupId GET parameter for the page. Try it – go to the normal users and groups pages, to to view the members of a group, and try replacing the integer ID of the group. (Not all are used)

So, that bit of magic shows me the list of users. In my page’s OnLoad event I also read the MembershipGroupId parameter and used that to read the name of the group we’re editting, which I then used in the PageTitle area. We’ll see this later.

Title and View Controls

(My Site is called ‘Blank’ and we’re editing the ‘Blank Members’ group)

That’s all I needed really, but as a bonus I’m also going to describe how I added the View Control. Continue reading “How I simplified the Users and Group UI – Listing Users”

Advertisement
How I simplified the Users and Group UI – Listing Users

How I simplified the Users and Group UI – Intro

Previously, I’d blogged about a simplified Users and Groups UI for SharePoint. I really annoys me that the standard one is so complex – I’m a techy, and a specialist, and it confuses me! I’m not sure what chance non-specialist admins will have.

The worst part is, though, often users just want to add or remove users from a pretty limited set of groups. I mean, this is implied by the standard ‘Visitors/Members/Owners’ groups on a site. Unfortunately, there are often a lot of other groups, and other complexities shown through the standard user interface in SharePoint.

For a Case Management system we’ve been working on, I built a simplified user interface. The idea was to make it easy for non-techies to add and remove users from specific groups. They weren’t to have access to all groups, and this wasn’t to replace the ordinary People and Groups pages – so more technical staff could still use those too. What I came up with is shown below.

case-permissions-page

It appears similar, initially – but the navigation on the left is the same as for the rest of our case site. Only the relevant groups (“Case Workers” and “Case Owners“) are linked to on the left, and these links are only shown to users who can edit the groups (Home and Audit aren’t related to people and groups). Also, the menus on this page only let users add or remove users – which is all they should need to do.

Note that the “Case Workers” and “Case Owners” groups are just the groups we happened to be using – you could build this to work for others, depending on your needs.

I built this user interface using 3 application pages put into the _layouts directory. They’re actually Code Behind ASPX pages, and so this is a Visual Studio solution, though some sections of the application could be built in SharePoint Designer.

The pages themselves are for:

  • Listing the users and letting admins remove users.
  • A page for adding new users.
  • A redirect page for identifying the correct ID for the group we want to edit.

The solution is a little complicated, so I’m going to break it down into pieces:

How I simplified the Users and Group UI – Intro

Simplified People and Groups pages in SharePoint

One of my pet peeves with SharePoint is the People and Groups pages. These are pretty damn complicated.

standard-perms-page

You typically get groups for:

  • Owners
  • Members
  • Visitors

And often you can have

  • Approvers
  • Moderators
  • Designers
  • Individual users granted rights directly on the site (rather than being in a group)

… and so on. And if individual sites start to break from inheritance and define their own groups, you get even more groups. It’s possible (especially if the administrator of the system doesn’t understand what they’re doing – which is often the case) to end up with 3 times as many groups as sites!

Frankly, this is enough to confuse me, never mind users. Trips into the People and Groups pages often takes me some time to understand what I’m seeing. And the worst part is that often users just want to be able ‘Give Fred access to this site’. They don’t care about other groups or other sites, permissions levels, or any of that jazz.

The case management system we’re working on at the moment has this sort of requirement. Each case is a site, and we want ‘Case Owners‘ to be able to add/remove ‘Case Owners‘ or ‘Case Workers‘. They don’t need access to other groups. They don’t need the ability to send emails, call people, remove users from the site collection, or any of the other (confusing) options on the menus. So, I built my own administration pages… Continue reading “Simplified People and Groups pages in SharePoint”

Simplified People and Groups pages in SharePoint

Office 2003 and SharePoint

One of the main selling points of Office 2007 (to me, anyway) is it’s integration with SharePoint 2007. However, customers usually seem to still be using Office 2003, and this degrades the user experience. One of the main things that irritates is Check-out/check-in policy, and users just opening things in Read-only mode.

Well, again, Ton Stegeman has a solution. As one of my colleague’s comments ‘Smart man, that’.

Office 2003 and SharePoint

Mailing an Active Directory Group

This was something that I set up in our offices, and was trying to set up for a client – but it turned out that there were a few more components involved than I’d first realised.

We have an AD group of ‘All Staff’ which contains, um, all staff. We also have a ‘Company Announcements’ list, and we wanted to send any announcements added to that list to all our staff. As an administrator, I could add an alert for the ‘All Staff’ group ( on the list click List Settings > Alert Me and then enter the group we want to email)

The ‘All Staff group’ is a Mail enabled security group, with it’s own address – e.g. staff@example.com. The puzzle for me (not being an exchange or AD expert) was that in that case, what resolves the addresses? I’d thought that the group being mail enabled meant that you could resolve the email addresses of the users within the group – but what does that? Well, Exchange, as it happens, though I’m not sure how to configure that. The upshot of it is, though, that the AD group you want to mail needs to be mail enabled, and you may need to talk to your exchange guys too.

This is unfortunate, as in a lot of organizations making changes to AD can be a tortuous process. Still, if there is an appropriate group you can email then this is a quick win with things like Announcements lists.

Mailing an Active Directory Group

Highlighting tabs in the top navigation

We’ve got a customer who’s top navigation tabs aren’t being used as links to content in SharePoint. Instead, these tabs take users to other parts of their system, which is maybe fair enough given that the left navigation also gives them the same sort of access; indeed this duplication of navigation is often a source of consternation with clients.

Anyway, they’ve now added site that they do want linked from the top navigation bar. Therefore, if you click on this tab, they want it to appear highlighted – and it’s the only tab that would.

The site in question isn’t a subsite of the root site of the site collection, so I must confess, I didn’t think you could do this. They emailed and asked, though, and I suggested that the full URL that they were using (e.g. http://sharepoint/somesite/tabsite) wasn’t a good idea – as if they extend their web app for an extranet that link won’t work. As it transpired though, they’d thought to try a relative URL (e.g. /somesite/tabsite) and that worked nicely!

I had to check:

nav-link

showing:

highlighted-top-nav

There we go, a site 2 levels down, highlighted in the top nav correctly!

I suppose it makes sense that the relative URL might work – but I’d sort of assumed that the manual links wouldn’t undergo the same checks as the ‘show subsites’ links would.

Highlighting tabs in the top navigation

Custom Email Alert Templates for individual lists

Over time my inbox fills with notes of things I want to blog about – even if just as notes for myself in the future. This was one that I’d forgotten about – you can set an email alert template for an individual list! Really, it’s setting up the Alert Template (in a copy of AlertTemplates.xml), setting that that file can be used for alerts (via STSADM), and then setting that alert template to be used through the object model.

You also get to run a CAML query on the list, and access to the before and after values for items, when filtering what things to send emails about.

It’s all in this very good article.

Custom Email Alert Templates for individual lists

Plan Your Publishing Pages

I was reading Andrew Connell’s book ‘SharePoint 2007 Web Content Management‘ and it made something crystallize for me. I’ve been pondering this for about 8 months or so, but I believe that several of our customers are using the Publishing features of MOSS incorrectly, and that simply basing sites on out-of-box Collaboration and Publishing site templates is a mistake.

(Well, at least without additional planning) Continue reading “Plan Your Publishing Pages”

Plan Your Publishing Pages