break out lib/permissions.rb for registering/listing permissions, so
that plugins can register them too without requiring all of
RoleOverride. also, enhance AdheresToPolicy to allow multiple
set_policy blocks for one class, so that plugins can define additional
policies on classes that already have some from stock canvas-lms.
test-plan:
* run specs in vendor/plugins/adheres_to_policy to ensure it didn't
break
* add a permission from a plugin, load the account permissions page,
see the new permission
* add a policy to an existing class from a plugin and add a view
controlled by that policy.
- existing views controlled by existing policies should behave as
before
- new view should be properly controlled by new policy
Change-Id: I9426c2eff37642a7ae01ada869b7c59e7ac178a1
Reviewed-on: https://gerrit.instructure.com/9111
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>