I want to check if someone is an Approver. I am doing it in my Swedish Site:

SPGroup approvers = web.Groups["Godkännare"]
//check if the current person is in this group - code omitted

What if I create the site collection in English, it won't work.

We have beautiful associated groups for members, owners and visitors.

But what is the best way to do with Approvers?

What do you think?


I dont think so!

The groups are created per site collection and many of them are even named after the name of the site collection.

The SPGroupCollection's item collection gives you two overloads, string and ID (and i dont see any methods that would work) so I guess you are stuck with either looking at the permission mask (role wont do as this is translated also).

|improve this answer|||||
  • 1
    Thanks for your response, Anders! Maybe I should turn the procedure, and check if a user has SPBasePermissions.ApproveItems instead of checking if a user is in Approvers group (I got this idea when I read your advice to look at the permission mask). But this permission is possessed even by Owners (FullMask) and Designers (Design) as well. I must check if this satisfyes my business requirements. – Anatoly Mironov Oct 20 '11 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.