Esempio n. 1
0
        public async Task <InvitationsIssued> GetAsync()
        {
            UserInfo user = await GetUserInfoAsync();

            if (!MasterEmails.Contains(user.Email))
            {
                throw new HttpResponseException(HttpStatusCode.Forbidden);
            }

            return(await InvitationOperations.GetCurrentInvitations(DbContext));
        }
Esempio n. 2
0
        // GET: Invitations
        public async Task <ActionResult> Index()
        {
            UserInfo user = await GetUserInfoAsync();

            if (!MasterEmails.Contains(user.Email))
            {
                return(new HttpStatusCodeResult(HttpStatusCode.Forbidden));
            }

            var current = await InvitationOperations.GetCurrentInvitations(DbContext);

            var vm = new InvitationsViewModel
            {
                OutstandingInvitations = current.Outstanding,
                AcceptedInvitations    = current.Accepted
            };

            return(View(await SetBasicVmInfo(vm)));
        }