lundi 26 janvier 2015

Check User permission not working when user add by a AD Group



Following code returns true if the user has been added to a certain SP group directly. However it returns false if the user is added via an AD Group. How do I fix it so that it returns true even if the user has not been added to the sp group directly but via an AD group?



bool userInGroup = user.Groups.Cast<SPGroup>().Any(g => g.ID == theGroup.ID);







0 commentaires:

Enregistrer un commentaire