Esempio n. 1
0
        private async Task CheckCompetentAuthority(NotificationApplication notification)
        {
            var userCompetentAuthority = await context.GetUsersCompetentAuthority(userContext);

            if (notification.CompetentAuthority != userCompetentAuthority)
            {
                throw new SecurityException(string.Format("Access denied to this notification {0} for user {1} for competent authority {2}",
                                                          notification.Id, userContext.UserId, userCompetentAuthority));
            }
        }