Skip to content

Commit

Permalink
webservice MDL-17135 remove old webserviceuse capability. It is now c…
Browse files Browse the repository at this point in the history
…ontrolled by protocol capabilities. Add warning to protocol capabilities.
  • Loading branch information
mouneyrac committed Feb 1, 2010
1 parent 2e38d70 commit 52dd27b
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion lang/en_utf8/role.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@
$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';
Expand Down
9 changes: 1 addition & 8 deletions lib/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -774,13 +774,6 @@
)
),

'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',
Expand Down Expand Up @@ -1512,7 +1505,7 @@
),
'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(
Expand Down
1 change: 1 addition & 0 deletions webservice/amf/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions webservice/rest/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions webservice/soap/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions webservice/xmlrpc/db/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 52dd27b

Please sign in to comment.