File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,9 @@ fieldset:disabled {
84
84
# newsite {
85
85
flex : 2 2 ;
86
86
}
87
+ # btn-clear-container {
88
+ margin-top : .5em ;
89
+ }
87
90
88
91
# policy {
89
92
display : block;
Original file line number Diff line number Diff line change @@ -82,6 +82,7 @@ <h3 class="flextabs__tab"><button class="flextabs__toggle enforcement_required">
82
82
< div class ="cssload-whirlpool "> </ div >
83
83
</ div >
84
84
</ div >
85
+ < button id ="btn-clear-container "> Clear permissions for this container</ button >
85
86
</ section >
86
87
</ div >
87
88
Original file line number Diff line number Diff line change 240
240
sitesUI . onChange ( ) ;
241
241
}
242
242
} , true ) ;
243
+
244
+ document . querySelector ( "#btn-clear-container" ) . addEventListener ( "click" , async ev => {
245
+ if ( confirm ( "All site permissions for this container will be removed.\nThis action cannot be reverted.\nDo you want to continue?" ) ) {
246
+ sitesUI . clear ( )
247
+ currentPolicy . sites = Sites . hydrate ( { } ) ;
248
+ await UI . updateSettings ( { policy, contextStore} ) ;
249
+ sitesUI . render ( currentPolicy . sites ) ;
250
+ }
251
+ } ) ;
243
252
}
244
253
245
254
You can’t perform that action at this time.
0 commit comments