YouConf.Controllers.ConferenceController.IsCurrentUserAuthorizedToAdministerConference C# (CSharp) Method

IsCurrentUserAuthorizedToAdministerConference() private method

private IsCurrentUserAuthorizedToAdministerConference ( Conference conference ) : bool
conference YouConf.Common.Data.Entities.Conference
return bool
        private bool IsCurrentUserAuthorizedToAdministerConference(Conference conference)
        {
            var userProfile = YouConfDbContext.UserProfiles.FirstOrDefault(x => x.UserName == User.Identity.Name);
            return conference.Administrators.Contains(userProfile);
        }