public IActionResult Get(int notebookId) { var currentUser = User.Claims.Single(c => c.Type == ClaimTypes.Email).Value; if (!_notebookService.IsUserOwner(notebookId, currentUser)) { return(Forbid()); } else { return(Ok(_context.NotebookShare.Where(ns => ns.NotebookId == notebookId))); } }