Move EnsureOneOf into the dispatch.rs, make an interface more general (#10379)

* move EnsureOneOf into the dispatch.rs, make an interface more general

* Update frame/support/src/traits/dispatch.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
authored and GitHub committed 2021-12-01 21:31:57 +00:00
1 parent a18749d315
commit 1d19c7dc7f
7 files changed
+72 -51

No files matched your search

+3 -3
View File
@@ -805,11 +805,11 @@ mod tests {
use crate as scheduler;
use frame_support::{
assert_err, assert_noop, assert_ok, ord_parameter_types, parameter_types,
traits::{Contains, EqualPrivilegeOnly, OnFinalize, OnInitialize},
traits::{Contains, EnsureOneOf, EqualPrivilegeOnly, OnFinalize, OnInitialize},
weights::constants::RocksDbWeight,
Hashable,
};
use frame_system::{EnsureOneOf, EnsureRoot, EnsureSignedBy};
use frame_system::{EnsureRoot, EnsureSignedBy};
use sp_core::H256;
use sp_runtime::{
testing::Header,
@@ -950,7 +950,7 @@ mod tests {
type PalletsOrigin = OriginCaller;
type Call = Call;
type MaximumWeight = MaximumSchedulerWeight;
type ScheduleOrigin = EnsureOneOf<u64, EnsureRoot<u64>, EnsureSignedBy<One, u64>>;
type ScheduleOrigin = EnsureOneOf<EnsureRoot<u64>, EnsureSignedBy<One, u64>>;
type MaxScheduledPerBlock = MaxScheduledPerBlock;
type WeightInfo = ();
type OriginPrivilegeCmp = EqualPrivilegeOnly;