public bool IsMemberAuthorized( bool allowAll = false, IEnumerable <string> allowTypes = null, IEnumerable <string> allowGroups = null, IEnumerable <int> allowMembers = null) { if (UmbracoContext.Current == null) { return(false); } var helper = new MembershipHelper(UmbracoContext.Current); return(helper.IsMemberAuthorized(allowAll, allowTypes, allowGroups, allowMembers)); }
public bool IsMemberAuthorized( bool allowAll = false, IEnumerable <string> allowTypes = null, IEnumerable <string> allowGroups = null, IEnumerable <int> allowMembers = null) { if (HttpContext.Current == null || ApplicationContext.Current == null) { return(false); } var helper = new MembershipHelper(ApplicationContext.Current, new HttpContextWrapper(HttpContext.Current)); return(helper.IsMemberAuthorized(allowAll, allowTypes, allowGroups, allowMembers)); }