Previously the Pausable plugin required a contract to be Ownable to manage authorization of (un)pausing features and to define exemptions via except. This PR makes Pausable use AccessControllable instead of Ownable.
Overview
Developers specify which Acl role(s) can pause and unpause features.
When using except with #[pause] or #[if_paused], developers can specify Acl role(s) which are exempted.
Examples
Files in examples/pausable-examples/ have not been updated, for now. I'd propose to remove the contracts there and instead add a test contract in /near-plugins/tests/contracts/pausable, see #48.
I suggest we first decide if this is a reasonable approach before updating examples.
As discussed offline, merging now without modifying examples/pausable-examples. In a follow up PR I'll deduplicate and update examples and tests as described in #48.
Previously the
Pausable
plugin required a contract to beOwnable
to manage authorization of (un)pausing features and to define exemptions viaexcept
. This PR makesPausable
useAccessControllable
instead ofOwnable
.Overview
except
with#[pause]
or#[if_paused]
, developers can specify Acl role(s) which are exempted.Examples
Files in examples/pausable-examples/ have not been updated, for now. I'd propose to remove the contracts there and instead add a test contract in
/near-plugins/tests/contracts/pausable
, see #48.I suggest we first decide if this is a reasonable approach before updating examples.