Skip to content

Commit

Permalink
Add inspection data read role
Browse files Browse the repository at this point in the history
  • Loading branch information
olaals committed Dec 2, 2024
1 parent bf0009a commit e2eb3ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/Controllers/InspectionDataController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public async Task<ActionResult<InspectionDataResponse>> GetInspectionDataByInspe
/// <para> This endpoint returns a link to an anonymized inspection data in blob storage. </para>
/// </remarks>
[HttpGet]
[Authorize(Roles = Role.Any)]
[Authorize(Roles = Role.InspectionDataRead)]
[Route("{inspectionId}/inspection-data-storage-location")]
[ProducesResponseType(typeof(BlobStorageLocation), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status202Accepted)]
Expand Down
2 changes: 2 additions & 0 deletions api/Controllers/Models/Role.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ public class Role
/// </para>
/// </summary>
public const string Any = $"{ReadOnlyRole}, {UserRole}, {Admin}";

public const string InspectionDataRead = "InspectionData.Read";
}

0 comments on commit e2eb3ca

Please sign in to comment.