/// Clears the provisional whitelist. If no principals exist in the
/// whitelist, this is a no-op.
Clears the provisional whitelist. If no principals exist in the
whitelist, this is a no-op.
Clears the provisional whitelist . If no principals exist in the whitelist this is a no - op .
pub fn do_clear_provisional_whitelist(&mut self) {
        // Retrieve the provisional whitelist along with the current registry version.
        let mut provisional_whitelist = match self.get(
            make_provisional_whitelist_record_key().as_bytes(),
            self.latest_version(),
        ) {
            Some(RegistryValue {
                value,
                version: _,
                deletion_marker: _,
            }) => decode_registry_value::<ProvisionalWhitelist>(value.clone()),
            None => panic!("Provisional whitelist not found in the registry"),
        };
        // Set to empty list.
        provisional_whitelist.list_type = provisional_whitelist::ListType::Set.into();
        provisional_whitelist.set = vec![];
        let mutations = vec![upsert(
            make_provisional_whitelist_record_key().as_bytes().to_vec(),
            encode_or_panic(&provisional_whitelist),
        )];
        // Check invariants before applying mutations
        self.maybe_apply_mutation_internal(mutations);
    }
pub fn do_clear_provisional_whitelist ( & mut self ) { // Retrieve the provisional whitelist along with the current registry version. let mut provisional_whitelist = match self . get ( make_provisional_whitelist_record_key ( ) . as_bytes ( ) , self . latest_version ( ) , ) { Some ( RegistryValue { value , version : _ , deletion_marker : _ , } ) => decode_registry_value :: < ProvisionalWhitelist > ( value . clone ( ) ) , None => panic ! ( " " ) , } ; // Set to empty list. provisional_whitelist . list_type = provisional_whitelist :: ListType :: Set . into ( ) ; provisional_whitelist . set = vec ! [ ] ; let mutations = vec ! [ upsert ( make_provisional_whitelist_record_key ( ) as_bytes ( ) to_vec ( ) encode_or_panic ( provisional_whitelist ) ) ] ; // Check invariants before applying mutations self . maybe_apply_mutation_internal ( mutations ) ; }
Clears the provisional whitelist.
Clears the provisional whitelist .
&mut self