diff --git a/runtime/common/src/pallets_config.rs b/runtime/common/src/pallets_config.rs index 7113df7e006c9b73a6848e2ae8cb93efc235c686..8fb5add3976024f04e99472b2ee4a8cb777bb506 100644 --- a/runtime/common/src/pallets_config.rs +++ b/runtime/common/src/pallets_config.rs @@ -27,7 +27,7 @@ macro_rules! pallets_config { impl frame_system::Config for Runtime { /// The basic call filter to use in dispatchable. - type BaseCallFilter = frame_support::traits::Everything; + type BaseCallFilter = BaseCallFilter; /// Block & extrinsics weights: base values and limits. type BlockWeights = BlockWeights; /// The maximum length of a block (in bytes). diff --git a/runtime/g1/src/lib.rs b/runtime/g1/src/lib.rs index 6d5d6ec90c2addd7a304ea7d8e48766dfad223bd..b654b9e98c9a6d8110d176ed02fa285dd8ff82cd 100644 --- a/runtime/g1/src/lib.rs +++ b/runtime/g1/src/lib.rs @@ -140,6 +140,17 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; +pub struct BaseCallFilter; +impl frame_support::traits::Contains<Call> for BaseCallFilter { + fn contains(call: &Call) -> bool { + match call { + Call::Membership(_) => false, + Call::Session(_) => false, + _ => true, + } + } +} + common_runtime_except_gdev::pallets_config! { impl pallet_sudo::Config for Runtime { type Event = Event; diff --git a/runtime/gdev/src/lib.rs b/runtime/gdev/src/lib.rs index a804a418796abe6e9b56663a9738a471b90253af..08bccd52b71d470bcd3b27ade84326365af4b702 100644 --- a/runtime/gdev/src/lib.rs +++ b/runtime/gdev/src/lib.rs @@ -132,6 +132,16 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; +pub struct BaseCallFilter; +impl frame_support::traits::Contains<Call> for BaseCallFilter { + fn contains(call: &Call) -> bool { + match call { + Call::Membership(_) => false, + _ => true, + } + } +} + // Configure FRAME pallets to include in runtime. common_runtime::pallets_config! { impl pallet_sudo::Config for Runtime { diff --git a/runtime/gtest/src/lib.rs b/runtime/gtest/src/lib.rs index e838a8127906b0e189a46e92c84600a6e2d0dace..b1ab558f5d4ce952ceee1ed97ae962dc37c17ecf 100644 --- a/runtime/gtest/src/lib.rs +++ b/runtime/gtest/src/lib.rs @@ -140,6 +140,17 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; +pub struct BaseCallFilter; +impl frame_support::traits::Contains<Call> for BaseCallFilter { + fn contains(call: &Call) -> bool { + match call { + Call::Membership(_) => false, + Call::Session(_) => false, + _ => true, + } + } +} + common_runtime_except_gdev::pallets_config! { impl pallet_sudo::Config for Runtime { type Event = Event;