Change default back to permissive for now.
This commit is contained in:
parent
db73b0d66f
commit
69eec105a7
@ -1 +1 @@
|
|||||||
Subproject commit 9028c4801fd39fbb71a9796979182549a24e81c8
|
Subproject commit e8f4624b7f1a15c63674eecf577c7ab76c3b16be
|
@ -478,7 +478,8 @@ mod tests {
|
|||||||
let ap = AccountProvider::transient_provider();
|
let ap = AccountProvider::transient_provider();
|
||||||
let address = ap.new_account("test").unwrap();
|
let address = ap.new_account("test").unwrap();
|
||||||
|
|
||||||
// Default policy should be to return nothing
|
// When returning nothing
|
||||||
|
ap.set_new_dapps_whitelist(Some(vec![])).unwrap();
|
||||||
assert_eq!(ap.dapps_addresses("app1".into()).unwrap(), vec![]);
|
assert_eq!(ap.dapps_addresses("app1".into()).unwrap(), vec![]);
|
||||||
|
|
||||||
// change to all
|
// change to all
|
||||||
|
@ -175,7 +175,7 @@ impl DappsSettingsStore {
|
|||||||
|
|
||||||
/// Returns current new dapps policy
|
/// Returns current new dapps policy
|
||||||
pub fn policy(&self) -> NewDappsPolicy {
|
pub fn policy(&self) -> NewDappsPolicy {
|
||||||
self.policy.get("default").cloned().unwrap_or(NewDappsPolicy::Whitelist(vec![]))
|
self.policy.get("default").cloned().unwrap_or(NewDappsPolicy::AllAccounts)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns recent dapps (in order of last request)
|
/// Returns recent dapps (in order of last request)
|
||||||
@ -353,8 +353,9 @@ mod tests {
|
|||||||
let temp = RandomTempPath::create_dir();
|
let temp = RandomTempPath::create_dir();
|
||||||
let path = temp.as_str().to_owned();
|
let path = temp.as_str().to_owned();
|
||||||
let mut store = DappsSettingsStore::new(path.clone());
|
let mut store = DappsSettingsStore::new(path.clone());
|
||||||
|
|
||||||
// Test default policy
|
// Test default policy
|
||||||
assert_eq!(store.policy(), NewDappsPolicy::Whitelist(vec![]));
|
assert_eq!(store.policy(), NewDappsPolicy::AllAccounts);
|
||||||
|
|
||||||
// when
|
// when
|
||||||
store.set_policy(NewDappsPolicy::Whitelist(vec![1.into(), 2.into()]));
|
store.set_policy(NewDappsPolicy::Whitelist(vec![1.into(), 2.into()]));
|
||||||
|
Loading…
Reference in New Issue
Block a user