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 {
8484# newsite {
8585 flex : 2 2 ;
8686}
87+ # btn-clear-container {
88+ margin-top : .5em ;
89+ }
8790
8891# policy {
8992 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">
8282 < div class ="cssload-whirlpool "> </ div >
8383 </ div >
8484 </ div >
85+ < button id ="btn-clear-container "> Clear permissions for this container</ button >
8586 </ section >
8687</ div >
8788
Original file line number Diff line number Diff line change 240240 sitesUI . onChange ( ) ;
241241 }
242242 } , 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+ } ) ;
243252 }
244253
245254
You can’t perform that action at this time.
0 commit comments