I have a webpart. If current user has edit permission then I have to display some information in webpart content.
How to check that current user has edit permission to a webpart in Sharepoint 2007 and 2010?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try using the SPWebPartManager.GetPermissions method, this should let you know if a user has access to edit a web part. More info can be found here.
Here is a link with the enumerations of Permissions. There is also a link on this page to demonstrate how this is used in SharePoint 2007