55using Nop . Services . Configuration ;
66using Nop . Services . Localization ;
77using Nop . Services . Messages ;
8+ using Nop . Services . Security ;
89using Nop . Web . Framework ;
910using Nop . Web . Framework . Controllers ;
1011using Nop . Web . Framework . Mvc . Filters ;
@@ -70,6 +71,7 @@ bool needBlock(BatchResponse response, string endpoint)
7071
7172 #region Methods
7273
74+ [ CheckPermission ( StandardPermission . Configuration . MANAGE_PLUGINS ) ]
7375 public async Task < IActionResult > Configure ( )
7476 {
7577 var model = new ConfigurationModel
@@ -85,6 +87,7 @@ public async Task<IActionResult> Configure()
8587
8688 [ HttpPost , ActionName ( "Configure" ) ]
8789 [ FormValueRequired ( "save" ) ]
90+ [ CheckPermission ( StandardPermission . Configuration . MANAGE_PLUGINS ) ]
8891 public async Task < IActionResult > Configure ( ConfigurationModel model )
8992 {
9093 if ( ! ModelState . IsValid )
@@ -119,6 +122,7 @@ public async Task<IActionResult> Configure(ConfigurationModel model)
119122
120123 [ HttpPost , ActionName ( "Configure" ) ]
121124 [ FormValueRequired ( "sync-contacts" ) ]
125+ [ CheckPermission ( StandardPermission . Configuration . MANAGE_PLUGINS ) ]
122126 public async Task < IActionResult > SyncContacts ( )
123127 {
124128 if ( ! ModelState . IsValid || string . IsNullOrEmpty ( _omnisendSettings . BrandId ) )
@@ -131,6 +135,7 @@ public async Task<IActionResult> SyncContacts()
131135
132136 [ HttpPost , ActionName ( "Configure" ) ]
133137 [ FormValueRequired ( "sync-products" ) ]
138+ [ CheckPermission ( StandardPermission . Configuration . MANAGE_PLUGINS ) ]
134139 public async Task < IActionResult > SyncProducts ( )
135140 {
136141 if ( ! ModelState . IsValid || string . IsNullOrEmpty ( _omnisendSettings . BrandId ) )
@@ -144,6 +149,7 @@ public async Task<IActionResult> SyncProducts()
144149
145150 [ HttpPost , ActionName ( "Configure" ) ]
146151 [ FormValueRequired ( "sync-orders" ) ]
152+ [ CheckPermission ( StandardPermission . Configuration . MANAGE_PLUGINS ) ]
147153 public async Task < IActionResult > SyncOrders ( )
148154 {
149155 if ( ! ModelState . IsValid || string . IsNullOrEmpty ( _omnisendSettings . BrandId ) )
0 commit comments