Exemplo n.º 1
0
        public async Task <IActionResult> Share(int id)
        {
            var project = await _projectsService.GetProject(id);

            if (project == null)
            {
                return(NotFound());
            }

            if (await _permissionService.CurrentUserHasAccessAsync(id, _projectsService, Keeper.Enums.Role.Owner) == false)
            {
                return(Unauthorized());
            }

            var shareProjectViewModel = ProjectFactory.ConvertForShare(project);

            return(View(shareProjectViewModel));
        }