@@ -39,7 +39,7 @@ ITinyEventBus tinyEventBus
3939 _tinyEventBus = tinyEventBus ;
4040 }
4141
42- [ TypeFilter ( typeof ( PermissionCheckAttribute ) , Arguments = new object [ ] { "Config.Add" , Functions . Config_Add } ) ]
42+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) , Arguments = new object [ ] { Functions . Config_Add } ) ]
4343 [ HttpPost ]
4444 public async Task < IActionResult > Add ( [ FromBody ] ConfigVM model , EnvString env )
4545 {
@@ -88,7 +88,7 @@ public async Task<IActionResult> Add([FromBody] ConfigVM model, EnvString env)
8888 }
8989
9090 [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
91- Arguments = new object [ ] { "Config.AddRange" , Functions . Config_Add } ) ]
91+ Arguments = new object [ ] { Functions . Config_Add } ) ]
9292 [ HttpPost ]
9393 public async Task < IActionResult > AddRange ( [ FromBody ] List < ConfigVM > model , EnvString env )
9494 {
@@ -146,7 +146,7 @@ public async Task<IActionResult> AddRange([FromBody] List<ConfigVM> model, EnvSt
146146 }
147147
148148 [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
149- Arguments = new object [ ] { "Config.Edit" , Functions . Config_Edit } ) ]
149+ Arguments = new object [ ] { Functions . Config_Edit } ) ]
150150 [ HttpPost ]
151151 public async Task < IActionResult > Edit ( [ FromBody ] ConfigVM model , [ FromQuery ] EnvString env )
152152 {
@@ -254,6 +254,8 @@ public async Task<IActionResult> All(string env)
254254 /// <param name="current">Current page number.</param>
255255 /// <returns></returns>
256256 [ HttpGet ]
257+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
258+ Arguments = new object [ ] { Functions . Config_Read } ) ]
257259 public async Task < IActionResult > Search ( string appId , string group , string key , OnlineStatus ? onlineStatus ,
258260 string sortField , string ascOrDesc , EnvString env , int pageSize = 20 , int current = 1 )
259261 {
@@ -295,6 +297,8 @@ public async Task<IActionResult> Search(string appId, string group, string key,
295297 }
296298
297299 [ HttpGet ]
300+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
301+ Arguments = new object [ ] { Functions . Config_Read } ) ]
298302 public async Task < IActionResult > Get ( string id , EnvString env )
299303 {
300304 if ( string . IsNullOrEmpty ( id ) ) throw new ArgumentNullException ( "id" ) ;
@@ -310,7 +314,7 @@ public async Task<IActionResult> Get(string id, EnvString env)
310314 }
311315
312316 [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
313- Arguments = new object [ ] { "Config.Delete" , Functions . Config_Delete } ) ]
317+ Arguments = new object [ ] { Functions . Config_Delete } ) ]
314318 [ HttpPost ]
315319 public async Task < IActionResult > Delete ( string id , EnvString env )
316320 {
@@ -343,7 +347,7 @@ public async Task<IActionResult> Delete(string id, EnvString env)
343347 }
344348
345349 [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
346- Arguments = new object [ ] { "Config.DeleteSome" , Functions . Config_Delete } ) ]
350+ Arguments = new object [ ] { Functions . Config_Delete } ) ]
347351 [ HttpPost ]
348352 public async Task < IActionResult > DeleteSome ( [ FromBody ] List < string > ids , EnvString env )
349353 {
@@ -385,7 +389,7 @@ public async Task<IActionResult> DeleteSome([FromBody] List<string> ids, EnvStri
385389
386390
387391 [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
388- Arguments = new object [ ] { "Config.Rollback" , Functions . Config_Publish } ) ]
392+ Arguments = new object [ ] { Functions . Config_Offline } ) ]
389393 [ HttpPost ]
390394 public async Task < IActionResult > Rollback ( string publishTimelineId , EnvString env )
391395 {
@@ -406,6 +410,8 @@ public async Task<IActionResult> Rollback(string publishTimelineId, EnvString en
406410 } ) ;
407411 }
408412
413+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
414+ Arguments = new object [ ] { Functions . Config_Read } ) ]
409415 [ HttpGet ]
410416 public async Task < IActionResult > ConfigPublishedHistory ( string configId , EnvString env )
411417 {
@@ -438,7 +444,7 @@ public async Task<IActionResult> ConfigPublishedHistory(string configId, EnvStri
438444 /// </summary>
439445 /// <returns></returns>
440446 [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
441- Arguments = new object [ ] { "Config.Publish" , Functions . Config_Publish } ) ]
447+ Arguments = new object [ ] { Functions . Config_Publish } ) ]
442448 [ HttpPost ]
443449 public async Task < IActionResult > Publish ( [ FromBody ] PublishLogVM model , EnvString env )
444450 {
@@ -517,6 +523,8 @@ public IActionResult PreViewJsonFile()
517523 /// </summary>
518524 /// <param name="appId">Application ID.</param>
519525 /// <returns></returns>
526+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
527+ Arguments = new object [ ] { Functions . Config_Read } ) ]
520528 public async Task < IActionResult > ExportJson ( string appId , EnvString env )
521529 {
522530 if ( string . IsNullOrEmpty ( appId ) ) throw new ArgumentNullException ( "appId" ) ;
@@ -540,6 +548,8 @@ public async Task<IActionResult> ExportJson(string appId, EnvString env)
540548 /// </summary>
541549 /// <param name="appId">Application ID.</param>
542550 /// <returns></returns>
551+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
552+ Arguments = new object [ ] { Functions . Config_Read } ) ]
543553 public async Task < IActionResult > WaitPublishStatus ( string appId , EnvString env )
544554 {
545555 if ( string . IsNullOrEmpty ( appId ) ) throw new ArgumentNullException ( "appId" ) ;
@@ -569,6 +579,8 @@ public async Task<IActionResult> WaitPublishStatus(string appId, EnvString env)
569579 /// </summary>
570580 /// <param name="appId">Application ID.</param>
571581 /// <returns></returns>
582+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
583+ Arguments = new object [ ] { Functions . Config_Read } ) ]
572584 public async Task < IActionResult > PublishHistory ( string appId , EnvString env )
573585 {
574586 if ( string . IsNullOrEmpty ( appId ) ) throw new ArgumentNullException ( "appId" ) ;
@@ -596,6 +608,8 @@ await _configService.GetPublishTimeLineNodeAsync(data.FirstOrDefault()?.PublishT
596608 } ) ;
597609 }
598610
611+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
612+ Arguments = new object [ ] { Functions . Config_Edit } ) ]
599613 public async Task < IActionResult > CancelEdit ( string configId , EnvString env )
600614 {
601615 if ( string . IsNullOrEmpty ( configId ) ) throw new ArgumentNullException ( "configId" ) ;
@@ -614,6 +628,8 @@ public async Task<IActionResult> CancelEdit(string configId, EnvString env)
614628 } ) ;
615629 }
616630
631+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
632+ Arguments = new object [ ] { Functions . Config_Edit } ) ]
617633 public async Task < IActionResult > CancelSomeEdit ( [ FromBody ] List < string > ids , EnvString env )
618634 {
619635 if ( ids == null ) throw new ArgumentNullException ( "ids" ) ;
@@ -633,7 +649,7 @@ public async Task<IActionResult> CancelSomeEdit([FromBody] List<string> ids, Env
633649 }
634650
635651 [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
636- Arguments = new object [ ] { "Config.EvnSync" , Functions . Config_Add } ) ]
652+ Arguments = new object [ ] { Functions . Config_Add } ) ]
637653 [ HttpPost ]
638654 public async Task < IActionResult > SyncEnv ( [ FromBody ] List < string > toEnvs , [ FromQuery ] string appId ,
639655 [ FromQuery ] string currentEnv )
@@ -660,6 +676,8 @@ public async Task<IActionResult> SyncEnv([FromBody] List<string> toEnvs, [FromQu
660676 } ) ;
661677 }
662678
679+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
680+ Arguments = new object [ ] { Functions . Config_Read } ) ]
663681 public async Task < IActionResult > GetKvList ( string appId , EnvString env )
664682 {
665683 if ( string . IsNullOrEmpty ( appId ) ) throw new ArgumentNullException ( "appId" ) ;
@@ -684,6 +702,8 @@ public async Task<IActionResult> GetKvList(string appId, EnvString env)
684702 /// </summary>
685703 /// <param name="appId">Application ID.</param>
686704 /// <returns></returns>
705+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
706+ Arguments = new object [ ] { Functions . Config_Read } ) ]
687707 public async Task < IActionResult > GetJson ( string appId , EnvString env )
688708 {
689709 if ( string . IsNullOrEmpty ( appId ) ) throw new ArgumentNullException ( "appId" ) ;
@@ -708,6 +728,8 @@ public async Task<IActionResult> GetJson(string appId, EnvString env)
708728 }
709729
710730 [ HttpPost ]
731+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
732+ Arguments = new object [ ] { Functions . Config_Edit } ) ]
711733 public async Task < IActionResult > SaveJson ( [ FromBody ] SaveJsonVM data , string appId , EnvString env )
712734 {
713735 if ( string . IsNullOrEmpty ( appId ) ) throw new ArgumentNullException ( nameof ( appId ) ) ;
@@ -725,6 +747,8 @@ public async Task<IActionResult> SaveJson([FromBody] SaveJsonVM data, string app
725747 }
726748
727749 [ HttpPost ]
750+ [ TypeFilter ( typeof ( PermissionCheckAttribute ) ,
751+ Arguments = new object [ ] { Functions . Config_Edit } ) ]
728752 public async Task < IActionResult > SaveKvList ( [ FromBody ] SaveKVListVM data , string appId , EnvString env )
729753 {
730754 if ( string . IsNullOrEmpty ( appId ) ) throw new ArgumentNullException ( nameof ( appId ) ) ;
0 commit comments