Near-One / near-plugins

Implementation of common patterns used for NEAR smart contracts.
Creative Commons Zero v1.0 Universal
27 stars 12 forks source link

Make Pausable use Acl for authorization #47

Closed mooori closed 1 year ago

mooori commented 1 year ago

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

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.

mooori commented 1 year ago

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.