I had a requirement to security trim some functionality in SharePoint to some user roles. Basically I wanted to display some controls / options in the Ribbon control to the users if they have “Design” permission level.
One thing to understand here is, SharePoint Security Groups has a group named, Designer. Checking is the current user in the Designer group will not be accurate. Because there can be new groups get created with the same permission set but with a different name. Also SharePoint allows you to add direct permission to users. (Not adding to a Group but directly give required permissions to the user itself).
Read more »