Change default back to permissive for now.

This commit is contained in:
Gav Wood 2016-12-15 13:40:44 +01:00
parent db73b0d66f
commit 69eec105a7
No known key found for this signature in database
GPG Key ID: C49C1ACA1CC9B252
3 changed files with 6 additions and 4 deletions

@ -1 +1 @@
Subproject commit 9028c4801fd39fbb71a9796979182549a24e81c8
Subproject commit e8f4624b7f1a15c63674eecf577c7ab76c3b16be

View File

@ -478,7 +478,8 @@ mod tests {
let ap = AccountProvider::transient_provider();
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![]);
// change to all

View File

@ -175,7 +175,7 @@ impl DappsSettingsStore {
/// Returns current new dapps policy
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)
@ -353,8 +353,9 @@ mod tests {
let temp = RandomTempPath::create_dir();
let path = temp.as_str().to_owned();
let mut store = DappsSettingsStore::new(path.clone());
// Test default policy
assert_eq!(store.policy(), NewDappsPolicy::Whitelist(vec![]));
assert_eq!(store.policy(), NewDappsPolicy::AllAccounts);
// when
store.set_policy(NewDappsPolicy::Whitelist(vec![1.into(), 2.into()]));