From 52dd27bfbcdf1b472f0fd5a05dc86866b5b66cfb Mon Sep 17 00:00:00 2001 From: jerome mouneyrac Date: Mon, 1 Feb 2010 03:23:35 +0000 Subject: [PATCH] webservice MDL-17135 remove old webserviceuse capability. It is now controlled by protocol capabilities. Add warning to protocol capabilities. --- lang/en_utf8/role.php | 1 - lib/db/access.php | 9 +-------- webservice/amf/db/access.php | 1 + webservice/rest/db/access.php | 1 + webservice/soap/db/access.php | 1 + webservice/xmlrpc/db/access.php | 1 + 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/lang/en_utf8/role.php b/lang/en_utf8/role.php index 1933c8e75a2..9461d61ce8c 100644 --- a/lang/en_utf8/role.php +++ b/lang/en_utf8/role.php @@ -241,7 +241,6 @@ $string['site:uploadusers'] = 'Upload new users from file'; $string['site:viewfullnames'] = 'Always see full names of users'; $string['site:viewparticipants'] = 'View participants'; $string['site:viewreports'] = 'View reports'; -$string['site:usewebservices'] = 'User can be served by Moodle web services'; $string['tag:manage'] = 'Manage all tags'; $string['tag:create'] = 'Create new tags'; $string['tag:edit'] = 'Edit existing tags'; diff --git a/lib/db/access.php b/lib/db/access.php index ed646db5ed3..96bd7683558 100644 --- a/lib/db/access.php +++ b/lib/db/access.php @@ -774,13 +774,6 @@ $capabilities = array( ) ), - 'moodle/site:usewebservices' => array( - 'riskbitmask' => RISK_SPAM | RISK_PERSONAL | RISK_XSS | RISK_CONFIG | RISK_DATALOSS, - 'captype' => 'write', - 'contextlevel' => CONTEXT_SYSTEM, - 'legacy' => array() - ), - 'moodle/course:viewscales' => array( 'captype' => 'read', @@ -1512,7 +1505,7 @@ $capabilities = array( ), 'moodle/webservice:createtoken' => array( - 'riskbitmask' => RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS, + 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS, 'captype' => 'write', 'contextlevel' => CONTEXT_SYSTEM, 'legacy' => array( diff --git a/webservice/amf/db/access.php b/webservice/amf/db/access.php index 101f33ffc4c..4299fc1fa73 100644 --- a/webservice/amf/db/access.php +++ b/webservice/amf/db/access.php @@ -3,6 +3,7 @@ $capabilities = array( 'webservice/amf:use' => array( + 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS, 'captype' => 'read', // in fact this may be considered read and write at the same time 'contextlevel' => CONTEXT_COURSE, // the context level should be probably CONTEXT_MODULE 'legacy' => array( diff --git a/webservice/rest/db/access.php b/webservice/rest/db/access.php index f836e630b0c..f9af2006b47 100644 --- a/webservice/rest/db/access.php +++ b/webservice/rest/db/access.php @@ -3,6 +3,7 @@ $capabilities = array( 'webservice/rest:use' => array( + 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS, 'captype' => 'read', // in fact this may be considered read and write at the same time 'contextlevel' => CONTEXT_COURSE, // the context level should be probably CONTEXT_MODULE 'legacy' => array( diff --git a/webservice/soap/db/access.php b/webservice/soap/db/access.php index 275e8471c2b..665e7b39191 100644 --- a/webservice/soap/db/access.php +++ b/webservice/soap/db/access.php @@ -3,6 +3,7 @@ $capabilities = array( 'webservice/soap:use' => array( + 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS, 'captype' => 'read', // in fact this may be considered read and write at the same time 'contextlevel' => CONTEXT_COURSE, // the context level should be probably CONTEXT_MODULE 'legacy' => array( diff --git a/webservice/xmlrpc/db/access.php b/webservice/xmlrpc/db/access.php index 8aaf944ef22..cb733d64d5f 100644 --- a/webservice/xmlrpc/db/access.php +++ b/webservice/xmlrpc/db/access.php @@ -3,6 +3,7 @@ $capabilities = array( 'webservice/xmlrpc:use' => array( + 'riskbitmask' => RISK_CONFIG | RISK_DATALOSS | RISK_SPAM | RISK_PERSONAL | RISK_XSS, 'captype' => 'read', // in fact this may be considered read and write at the same time 'contextlevel' => CONTEXT_COURSE, // the context level should be probably CONTEXT_MODULE 'legacy' => array(