webservice MDL-20805 added token creation page in user profil (with service required capability check and moodle/webservice:createtoken capibility check)

This commit is contained in:
jerome mouneyrac
2010-01-12 10:34:52 +00:00
parent 645e2cc14d
commit 5eacbd4be4
7 changed files with 227 additions and 16 deletions
+6
View File
@@ -3354,6 +3354,12 @@ class settings_navigation extends navigation_node {
}
}
// Webservice
if ($currentuser && !empty($CFG->enablewebservices) && has_capability('moodle/webservice:createtoken', $systemcontext)) {
$url = new moodle_url($CFG->wwwroot .'/user/managetoken.php', array('sesskey'=>sesskey()));
$usersetting->add(get_string('webservices', 'webservice'), $url, self::TYPE_SETTING);
}
// Repository
if (!$currentuser) {
require_once($CFG->dirroot . '/repository/lib.php');