From e1ce68c2f9a9ae937f8bbe7aa779a3cbf08cc18d Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 27 Mar 2011 20:44:50 +0200 Subject: [PATCH] MDL-26991 use archetypes instead of deprecated 'legacy' when defining roles in enrol plugins --- enrol/authorize/db/access.php | 8 ++++---- enrol/category/db/access.php | 2 +- enrol/cohort/db/access.php | 2 +- enrol/guest/db/access.php | 2 +- enrol/ldap/db/access.php | 2 +- enrol/manual/db/access.php | 10 +++++----- enrol/meta/db/access.php | 4 ++-- enrol/paypal/db/access.php | 8 ++++---- enrol/self/db/access.php | 8 ++++---- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/enrol/authorize/db/access.php b/enrol/authorize/db/access.php index 38a74096daf..c04804b4c74 100644 --- a/enrol/authorize/db/access.php +++ b/enrol/authorize/db/access.php @@ -5,7 +5,7 @@ $capabilities = array( 'enrol/authorize:config' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, ) ), @@ -13,7 +13,7 @@ $capabilities = array( 'enrol/authorize:manage' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, ) @@ -22,7 +22,7 @@ $capabilities = array( 'enrol/authorize:unenrol' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, ) ), @@ -30,7 +30,7 @@ $capabilities = array( 'enrol/authorize:unenrolself' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( ) ), diff --git a/enrol/category/db/access.php b/enrol/category/db/access.php index 945af281fb5..d18e55a4ba5 100644 --- a/enrol/category/db/access.php +++ b/enrol/category/db/access.php @@ -33,7 +33,7 @@ $capabilities = array( 'enrol/category:synchronised' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, - 'legacy' => array( + 'archetypes' => array( ) ), ); diff --git a/enrol/cohort/db/access.php b/enrol/cohort/db/access.php index 36735ef7e29..45303537c3e 100644 --- a/enrol/cohort/db/access.php +++ b/enrol/cohort/db/access.php @@ -32,7 +32,7 @@ $capabilities = array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW, ) diff --git a/enrol/guest/db/access.php b/enrol/guest/db/access.php index a1feaf9b6fe..2fa37e6f2b9 100644 --- a/enrol/guest/db/access.php +++ b/enrol/guest/db/access.php @@ -31,7 +31,7 @@ $capabilities = array( 'enrol/guest:config' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, ) diff --git a/enrol/ldap/db/access.php b/enrol/ldap/db/access.php index 1963af662d2..8eb1aa60b71 100644 --- a/enrol/ldap/db/access.php +++ b/enrol/ldap/db/access.php @@ -31,7 +31,7 @@ $capabilities = array( 'enrol/ldap:manage' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, ) ), diff --git a/enrol/manual/db/access.php b/enrol/manual/db/access.php index 11460e88b19..4658fc7b57d 100644 --- a/enrol/manual/db/access.php +++ b/enrol/manual/db/access.php @@ -31,7 +31,7 @@ $capabilities = array( 'enrol/manual:config' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, ) ), @@ -39,7 +39,7 @@ $capabilities = array( 'enrol/manual:enrol' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, ) @@ -48,7 +48,7 @@ $capabilities = array( 'enrol/manual:manage' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, ) @@ -57,7 +57,7 @@ $capabilities = array( 'enrol/manual:unenrol' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, ) @@ -66,7 +66,7 @@ $capabilities = array( 'enrol/manual:unenrolself' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( ) ), diff --git a/enrol/meta/db/access.php b/enrol/meta/db/access.php index 45b9cc8a171..6215c50b6fb 100644 --- a/enrol/meta/db/access.php +++ b/enrol/meta/db/access.php @@ -30,7 +30,7 @@ $capabilities = array( 'enrol/meta:config' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, ) @@ -40,7 +40,7 @@ $capabilities = array( 'enrol/meta:selectaslinked' => array( 'captype' => 'read', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, ) ), diff --git a/enrol/paypal/db/access.php b/enrol/paypal/db/access.php index c6db98ca46a..c474d92a8d9 100644 --- a/enrol/paypal/db/access.php +++ b/enrol/paypal/db/access.php @@ -31,7 +31,7 @@ $capabilities = array( 'enrol/paypal:config' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, ) ), @@ -39,7 +39,7 @@ $capabilities = array( 'enrol/paypal:manage' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, 'editingteacher' => CAP_ALLOW, ) @@ -48,7 +48,7 @@ $capabilities = array( 'enrol/paypal:unenrol' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'manager' => CAP_ALLOW, ) ), @@ -56,7 +56,7 @@ $capabilities = array( 'enrol/paypal:unenrolself' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( ) ), diff --git a/enrol/self/db/access.php b/enrol/self/db/access.php index 32bc34a4ca9..54fa9d8be22 100644 --- a/enrol/self/db/access.php +++ b/enrol/self/db/access.php @@ -32,7 +32,7 @@ $capabilities = array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW, ) @@ -42,7 +42,7 @@ $capabilities = array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW, ) @@ -51,7 +51,7 @@ $capabilities = array( 'enrol/self:unenrolself' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'student' => CAP_ALLOW, ) ), @@ -59,7 +59,7 @@ $capabilities = array( 'enrol/self:unenrol' => array( 'captype' => 'write', 'contextlevel' => CONTEXT_COURSE, - 'legacy' => array( + 'archetypes' => array( 'editingteacher' => CAP_ALLOW, 'manager' => CAP_ALLOW, )