@@ -16,7 +16,7 @@ public class AdminController(ConfigurationOptions options, HangfireLauncherServi
1616 /// Enqueues a job that updates xmldoc content from the latest release/pre-release tags.
1717 /// </summary>
1818 /// <returns>The unique identifier of the enqueued job.</returns>
19- [ Authorize ( "github" ) ]
19+ [ Authorize ( "github" , Roles = RDConstants . AdminRole ) ]
2020 [ HttpPost ( "admin/update/xmldoc" ) ]
2121 public IActionResult UpdateXmldocContent ( )
2222 {
@@ -28,23 +28,23 @@ public IActionResult UpdateXmldocContent()
2828 /// Enqueues a job that gets the latest release/pre-release tags and their respective assets, and updates the installer download stats.
2929 /// </summary>
3030 /// <returns>The unique identifier of the enqueued job.</returns>
31- [ Authorize ( "github" ) ]
31+ [ Authorize ( "github" , Roles = RDConstants . AdminRole ) ]
3232 [ HttpPost ( "admin/update/tags" ) ]
3333 public IActionResult UpdateTagMetadata ( )
3434 {
3535 var jobId = hangfire . UpdateTagMetadata ( ) ;
3636 return Ok ( jobId ) ;
3737 }
3838
39- [ Authorize ( "github" ) ]
39+ [ Authorize ( "github" , Roles = RDConstants . AdminRole ) ]
4040 [ HttpPost ( "admin/cache/clear" ) ]
4141 public IActionResult ClearCache ( )
4242 {
4343 cache . Clear ( ) ;
4444 return Ok ( ) ;
4545 }
4646
47- [ Authorize ( "github" ) ]
47+ [ Authorize ( "github" , Roles = $ " { RDConstants . AdminRole } , { RDConstants . ReviewerRole } " ) ]
4848 [ HttpGet ( "admin/audits/pending" ) ]
4949 public async Task < IActionResult > GetPendingAudits ( )
5050 {
@@ -54,7 +54,7 @@ public async Task<IActionResult> GetPendingAudits()
5454 return Ok ( new { edits = edits . ToArray ( ) , other = ops . ToArray ( ) } ) ;
5555 }
5656
57- [ Authorize ( "github" ) ]
57+ [ Authorize ( "github" , Roles = $ " { RDConstants . AdminRole } , { RDConstants . ReviewerRole } " ) ]
5858 [ HttpGet ( "admin/audits/{featureId}" ) ]
5959 public async Task < IActionResult > GetPendingAudits ( [ FromRoute ] int featureId )
6060 {
@@ -64,7 +64,7 @@ public async Task<IActionResult> GetPendingAudits([FromRoute] int featureId)
6464 return Ok ( new { edits = edits . ToArray ( ) , other = ops . ToArray ( ) } ) ;
6565 }
6666
67- [ Authorize ( "github" ) ]
67+ [ Authorize ( "github" , Roles = $ " { RDConstants . AdminRole } , { RDConstants . ReviewerRole } " ) ]
6868 [ HttpPost ( "admin/audits/approve/{id}" ) ]
6969 public async Task < IActionResult > ApprovePendingAudit ( [ FromRoute ] int id )
7070 {
@@ -100,7 +100,7 @@ public async Task<IActionResult> ApprovePendingAudit([FromRoute] int id)
100100 return Ok ( "Operation was approved successfully." ) ;
101101 }
102102
103- [ Authorize ( "github" ) ]
103+ [ Authorize ( "github" , Roles = $ " { RDConstants . AdminRole } , { RDConstants . ReviewerRole } " ) ]
104104 [ HttpPost ( "admin/audits/reject/{id}" ) ]
105105 public async Task < IActionResult > RejectPendingAudit ( [ FromRoute ] int id )
106106 {
0 commit comments