public IActionResult Create()
        {
            if (!RoleIs(Role.Administrator))
            {
                return(Forbid());
            }


            var form = new CreateUserForm
            {
                Entrances   = GetEntranceItems(_entranceService.AllActive()),
                Departments = GetDepartmentItems(_departmentService.AllActive())
            };

            SetRoles(form);

            return(View(form));
        }
        public IActionResult List()
        {
            if (!RoleIs(Role.Administrator, Role.Manager, Role.SecurityGuard))
            {
                return(Forbid());
            }


            var entrances = _entranceService.AllActive();

            var entrancesViewModels = _mapper.Map <IEnumerable <EntranceViewModel> >(entrances);

            return(View(entrancesViewModels));
        }