If you have ever developed SharePoint packages (wsp) with Visual Studio 2010, for sure you have feld a less than ideal user experience, because Visual Studio is not so integrated as WSPBuilder was with SharePoint 2007.
You can get a few of the better features of WSPBuilder installing the following add-on for Visual Studio: CKS: Development Tools Edition.
In particular, the commands I find more useful are:
- Copy to SharePoint Root
- Copy to GAC/BIN
- Recycle All SharePoint Application Pools
- Restart IIS
- Restart OWS Timer Process
- Attach to All SharePoint Processes
- Attach to IIS Worker Processes
- Attach to OWS Timer Process
Here is an extension method to determine if a SPUser is a member of a SPGroup:
public static bool IsMemberOf(this SPUser myInstance, SPGroup group)
bool Result = myInstance.Groups.Cast<SPGroup>().Select(x => x.Name).Contains(group.Name);
In SharePoint, there is the SPSecurityTrimmerControl, used to show some part of the page to only certain users. The criteria filter is based on SPBasePermissions. But what if you want to consider groups also? You can derive from SPSecurityTrimmedControl and override the Render method with your own logic, as described in the article Extending the SharePoint Security Trimmed Control to support SharePoint Groups.
In SQL Server, to change the schema owner (tipically, to be able to delete the user owning the schema), the command to use is something like this:
ALTER AUTHORIZATION ON SCHEMA::SchemaName TO NewUser;
SharePoint 2010 introduces the ribbon. It is useful, but you might want to hide it for Internet sites or for some types of users.
In the article Hiding the SharePoint Ribbon from Anonymous Users I've found a detailed solution using a combination of SPSecurityTrimmedControl and css.
Please note that you can adapt the article to your needs implementing a custom SPSecurityTrimmedControl, as described in Enhancing the SPSecurityTrimmedControl - Trimming UI on any criterion.
To get the SPWebApplication url, you have to write:
string webUrl = webApp.GetResponseUri(SPUrlZone.Default).AbsoluteUri;
If using PerformancePoint 2010 you get this error: "The chart cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service" you have to install or enable the State Service web appliaction service.
To do this, you have to launch the Central Administration and from the Farm Configuration Wizard and enable the State Service.
More details (and an alternative PowerShell script) can be found here: The chart cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service