Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

Blog

[Me] = Easy Item Level Security

Ever wanted item level security in SharePoint without the headaches?   It’s easier than you might think. 

Business Goal:   Provide a personalized dashboard where application owners can confirm they still need the system access they have.   This access review should be quick and easy, so limiting the display to only records they need would be great.

Technical Design:   SharePoint custom list with a multi-person column (“team”) and view filter [Me] to display only your records.   The multi-person column can hold any user in the User Information List of your site collection.    If you don’t see someone’s name here you will need to first grant them permissions (i.e. Contributor) and then come back to edit.    The permission grant will register their name into the site collection so you will see it in the drop down menu.   Despite having multiple values the =[Me] filter works perfectly to match only records where the visitor’s name is listed.   You can also use DataSheet edit mode here to fill down (or copy/paste) and update many records quickly.   Generally on a project like this many records will have a common “team” of people to review.

a3-3-2010 10-20-12 PM

image

Action Steps

  • Create custom list with your columns plus a multi-person column “team”
  • Grant site permissions
  • Populate the list.   For “team” select people who will see/edit their own records.
  • Modify the default view, add filter “team=[Me]’”
  • Test with a few pilot users
  • Send one email with the link and everyone will see a personalized list when they visit.

 

NOTE:  “security through obscurity” is not a best practice for highly sensitive or confidential data.    If the data has a firm require to not be viewed by a third party you’ll want to implement SharePoint’s true item level security feature.   http://www.codeplex.com/SPDActivities  has a great action step for granting security that can help automate to create a sustainable and reliable security enforcement.  (thanks to @unclepaul84)

Video Walkthrough (03:39)

How to build the sample list in full step-by-step video with a demo of the final working product.

[Me] = Easy Item Level Security from Jeff Jones on Vimeo.

Finding SPS 2003 sites in MOSS 2007 for reghost with TSQL

In a large environment admins often see mess leftover from previous upgrades.   Recently I looked at a system that had many sites upgraded from SharePoint Portal Server 2003.   They still had the old top menu, any had were using broken CSS themes that made for ugly looking homepages.

image

 

The above TSQL query can be run directly from SQL Management Studio against your content databases to locate any sites that have the “Create” navigation node.   The Microsoft.SharePoint.Navigation.SPNavigationNode  class provides our hook to go find SPS 2003 sites across the environment.

From there you can reset the navigation and remove these nodes to give a cleaner for streamlined appearance.

 

1

 

The “Site Settings Reset to site definition” feature can then be used to reset ASPX pages to out-of-the-box look and feel.   Lastly, I think it’s a good idea to apply a new theme.   Often unghosted (customized) ASPX pages also have a FrontPage 2003 theme applied.   Choosing a new theme overwrites those references with new clean CSS that looks much better.

 

Happy SharePoint-ing!

 

InfoPath Current User (AND Manager) Profile. Lumbergh Remix!

Recently I needed to get the current user and their manager’s Active Directory profile to auto-populate a form.   Itay Shakury wrote a great blog post titled Get the current user without writing code that covers the first need (current user) by reading UserProfileService.asmx. But I needed more.

xsn16

Download sample form – ADManagerDetails.xsn

The strategy was to use 2 data connections and query the 2nd with the manager user ID from the first.   At that point you can map any document text field to be ready only and get the default value from one of these data connections.

image

Action Steps

  1. New InfoPath form in design mode
  2. Add 2 receive data connections to http://sharepoint2007/_vti_bin/UserProfileService.asmx
  3. Name them “UserProfile” and “ManagerProfile
  4. Leave the input parameters empty.  It will default to the current user.
  5. Open form Rules and add steps to “re-query” the ManagerProfile:
    1. Set field’s value:  query subtree of ManagerProfile to “Manager” value from UserProfile data tree
    2. Query data connection ManagerProfile.  With the filter set, it will now return different data.
  6. Enjoy and tell your friends.

Video Walkthrough (05:57)

How to build the sample form (above download) in full step-by-step video.  Only 6 minutes!  Well worth the time. 

Hot

InfoPath Current User (AND Manager) Profile. Lumbergh Remix! from Jeff Jones on Vimeo.

MMC – Monitor SharePoint in Real-Time

The Microsoft Management Console has been around for years, since Windows NT 3.5 I believe, and it is a great tool.   Recently I helped create a custom .MSC file to watch SharePoint’s “heartbeat” in real-time and had a lot of fun with the results so I’ll share them here.

First, the beautiful end product: 

bueno.msc

Scope: Windows Server 2003 + MOSS 2007

How did we do it?

  1. Start Run “mmc.exe”   (this opens Author mode)
  2. Add Snap In (Ctrl+M)
  3. Click “Add” button
  4. Select “ActiveX Control” and click “Add”
  5. Select “System Monitor Control” and click “Next”
  6. Give it a name (i.e.  “Current Web Connections”) and click “Finish”

Feel free to repeat #3 to #6 to add multiple nodes to the tree.   This way you can monitor more than one metric across the farm.  With the left hand tree complete you are now ready.

Customize each node with:

  • Perfmon counters
  • Servers
  • Colors
  • Chart scale

Simply right click in the blank space, choose “Add Counter”, and follow the steps you would just like in Perfmon.exe     I personally like to add the same counter for each server in my farm so that on one chart I can see, for example, all of the CPU usage on all machines.

Once you’re pleased with the look and feel click “File Save As” and give a filename for the .MSC

You can now open multiple instances (windows) and tile them across the screen to have a real-time view of SharePoint’s “heartbeat” across all the web front ends in your farm.   

Why do I need this?

  • Establish a performance baseline (what is normal CPU?  during the work day?  at night during scheduled jobs?)
  • Troubleshoot a broken server (easily see differences)
  • Become more familiar with the impact of a topology design  (slow crawls = 100% CPU?)
  • It looks really cool, trust me!
image

image

image

 

image

image

image

image
Return to Top ▲Return to Top ▲