Revize 28a7019a
Přidáno uživatelem Vojtěch Bartička před asi 3 roky(ů)
Backend/Backend/Controllers/DocumentController.cs | ||
---|---|---|
25 | 25 |
} |
26 | 26 |
|
27 | 27 |
[HttpGet("/documents")] |
28 |
[Authorize(Core.Enums.ERole.ADMINISTRATOR)] |
|
28 | 29 |
[ProducesResponseType((int)HttpStatusCode.OK)] |
29 | 30 |
[ProducesResponseType((int)HttpStatusCode.Forbidden)] |
30 | 31 |
[ProducesResponseType((int)HttpStatusCode.InternalServerError)] |
31 |
[Authorize(Core.Enums.ERole.ADMINISTRATOR)] |
|
32 | 32 |
public ActionResult<DocumentListResponse> GetDocuments([FromServices] ClientInfo clientInfo, [FromBody] DocumentListRequest documentListRequest) |
33 | 33 |
{ |
34 | 34 |
if (clientInfo.LoggedUser == null) |
... | ... | |
41 | 41 |
} |
42 | 42 |
|
43 | 43 |
[HttpPost("/documents")] |
44 |
[Authorize(Core.Enums.ERole.ADMINISTRATOR)] |
|
44 | 45 |
[ProducesResponseType((int)HttpStatusCode.OK)] |
45 | 46 |
[ProducesResponseType((int)HttpStatusCode.Forbidden)] |
46 | 47 |
[ProducesResponseType((int)HttpStatusCode.InternalServerError)] |
47 | 48 |
[ProducesResponseType((int)HttpStatusCode.UnsupportedMediaType)] |
48 |
[Authorize(Core.Enums.ERole.ADMINISTRATOR)] |
|
49 | 49 |
public ActionResult PostDocuments([FromServices] ClientInfo clientInfo, [FromBody] DocumentAddRequest documentAddRequest) |
50 | 50 |
{ |
51 | 51 |
if (clientInfo.LoggedUser == null) |
Také k dispozici: Unified diff
Move Authorize attribute up in DocumentController