Guest User

Untitled

a guest
Jul 17th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. [HttpGet]
  2. [Authorize("FileAccess")]
  3. public FileContentResult GetFile(Guid fileId)
  4. {
  5. if (!this.UserHasNoAccessToFile(fileId))
  6. return Unauthorized(); // does not work
  7.  
  8. return File(...)
  9.  
  10. }
Add Comment
Please, Sign In to add comment