views:

12

answers:

1

Hi All

I am developing a sharepoint feature that should allow only Farm admin to delete a sitecollection. In SiteDeleting event, i need to chech if the user deleting is farmadmin. How should i do that? I got a property to check if user is webadmin(properties.Web.UserIsWebAdmin) or siteadmin(properties.Web.UserIsSiteAdmin) but how to check if the user is farm admin ?

Any help is much appreciated..

A: 

Use SPFarm.CurrentUserIsAdministrator method.

Janis Veinbergs

related questions