Esempio n. 1
0
        private async Task <List <Organisation> > GetRoleUsersOrganisations(string roleUserEmail)
        {
            var authorisedOrgIds = HttpContext.User.GetOrganisationIds();

            return(await _identityManagementRepository
                   .GetOrganisationsByEmailAndRoleAsync(roleUserEmail, RoleType.Developer, authorisedOrgIds));
        }
Esempio n. 2
0
        public async Task <IActionResult> Organisations()
        {
            var currentRoleUserEmail = HttpContext.User.GetNormalisedEmail();
            var organisationIds      = HttpContext.User.GetOrganisationIds();
            var organisations        = await _identityManagementRepository.GetOrganisationsByEmailAndRoleAsync(currentRoleUserEmail, RoleType.Administrator, organisationIds);

            var model = new OrganisationsViewModel
            {
                Organisations = organisations
            };

            return(View(model));
        }