From 79e9d08f4f55b8973994976128db62d7671c40d5 Mon Sep 17 00:00:00 2001 From: Gav Date: Sun, 25 Jun 2023 14:02:43 +0200 Subject: [PATCH 1/2] Runtime: Root can promote on Polkadot Collectives --- .../collectives/collectives-polkadot/src/fellowship/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/fellowship/mod.rs b/parachains/runtimes/collectives/collectives-polkadot/src/fellowship/mod.rs index 318f811111e..4f35892a859 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -29,7 +29,7 @@ use frame_support::{ parameter_types, traits::{EitherOf, EitherOfDiverse, MapSuccess, OriginTrait, TryWithMorphedArg}, }; -use frame_system::EnsureNever; +use frame_system::{EnsureNever, EnsureRootWithSuccess}; pub use origins::{ pallet_origins as pallet_fellowship_origins, Architects, EnsureCanPromoteTo, EnsureCanRetainAt, EnsureFellowship, Fellows, Masters, Members, ToVoice, @@ -106,12 +106,12 @@ impl pallet_ranked_collective::Config for Runtime type WeightInfo = weights::pallet_ranked_collective::WeightInfo; type RuntimeEvent = RuntimeEvent; // Promotions and the induction of new members are serviced by `FellowshipCore` pallet instance. - type PromoteOrigin = EnsureNever; + type PromoteOrigin = EnsureRootWithSuccess>; // Demotion is by any of: // - Root can demote arbitrarily. // - the FellowshipAdmin origin (i.e. token holder referendum); type DemoteOrigin = EitherOf< - frame_system::EnsureRootWithSuccess>, + EnsureRootWithSuccess>, MapSuccess< EnsureXcm>, Replace>, From 366a920e22436a6b4ff42c2ae036ad55cb980f43 Mon Sep 17 00:00:00 2001 From: Gav Date: Sun, 25 Jun 2023 17:01:23 +0200 Subject: [PATCH 2/2] Fixes --- .../collectives/collectives-polkadot/src/fellowship/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parachains/runtimes/collectives/collectives-polkadot/src/fellowship/mod.rs b/parachains/runtimes/collectives/collectives-polkadot/src/fellowship/mod.rs index 4f35892a859..d3526715344 100644 --- a/parachains/runtimes/collectives/collectives-polkadot/src/fellowship/mod.rs +++ b/parachains/runtimes/collectives/collectives-polkadot/src/fellowship/mod.rs @@ -29,7 +29,7 @@ use frame_support::{ parameter_types, traits::{EitherOf, EitherOfDiverse, MapSuccess, OriginTrait, TryWithMorphedArg}, }; -use frame_system::{EnsureNever, EnsureRootWithSuccess}; +use frame_system::EnsureRootWithSuccess; pub use origins::{ pallet_origins as pallet_fellowship_origins, Architects, EnsureCanPromoteTo, EnsureCanRetainAt, EnsureFellowship, Fellows, Masters, Members, ToVoice,