mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-17135 adding more security restrictions for web service users
This commit is contained in:
parent
44bce9b40b
commit
88af54fac2
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="lib/db" VERSION="20090921" COMMENT="XMLDB file for core Moodle tables"
|
||||
<XMLDB PATH="lib/db" VERSION="20091006" COMMENT="XMLDB file for core Moodle tables"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@ -2276,11 +2276,14 @@
|
||||
<KEY NAME="externalserviceid" TYPE="foreign" FIELDS="externalserviceid" REFTABLE="external_services" REFFIELDS="id" PREVIOUS="primary"/>
|
||||
</KEYS>
|
||||
</TABLE>
|
||||
<TABLE NAME="external_services_users" COMMENT="users allowed to use services with restrictedusers flag" PREVIOUS="external_services_functions">
|
||||
<TABLE NAME="external_services_users" COMMENT="users allowed to use services with restricted users flag" PREVIOUS="external_services_functions">
|
||||
<FIELDS>
|
||||
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="externalserviceid"/>
|
||||
<FIELD NAME="externalserviceid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" PREVIOUS="id" NEXT="userid"/>
|
||||
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" PREVIOUS="externalserviceid"/>
|
||||
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="false" PREVIOUS="externalserviceid" NEXT="iprestriction"/>
|
||||
<FIELD NAME="iprestriction" TYPE="char" LENGTH="255" NOTNULL="false" SEQUENCE="false" COMMENT="ip restriction" PREVIOUS="userid" NEXT="validuntil"/>
|
||||
<FIELD NAME="validuntil" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="timestampt - valid until data" PREVIOUS="iprestriction" NEXT="timecreated"/>
|
||||
<FIELD NAME="timecreated" TYPE="int" LENGTH="10" NOTNULL="false" UNSIGNED="true" SEQUENCE="false" COMMENT="created timestamp" PREVIOUS="validuntil"/>
|
||||
</FIELDS>
|
||||
<KEYS>
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id" NEXT="externalserviceid"/>
|
||||
|
@ -2492,7 +2492,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
upgrade_main_savepoint($result, 2009090800);
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2009091306) {
|
||||
if ($result && $oldversion < 2009100601) {
|
||||
// drop all previous tables defined during the dev phase
|
||||
$dropold = array('external_services_users', 'external_services_functions', 'external_services', 'external_functions');
|
||||
foreach ($dropold as $tablename) {
|
||||
@ -2501,10 +2501,10 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
$dbman->drop_table($table);
|
||||
}
|
||||
}
|
||||
upgrade_main_savepoint($result, 2009091306);
|
||||
upgrade_main_savepoint($result, 2009100601);
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2009091307) {
|
||||
if ($result && $oldversion < 2009100602) {
|
||||
/// Define table external_functions to be created
|
||||
$table = new xmldb_table('external_functions');
|
||||
|
||||
@ -2526,10 +2526,10 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
$dbman->create_table($table);
|
||||
|
||||
/// Main savepoint reached
|
||||
upgrade_main_savepoint($result, 2009091307);
|
||||
upgrade_main_savepoint($result, 2009100602);
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2009091308) {
|
||||
if ($result && $oldversion < 2009100603) {
|
||||
/// Define table external_services to be created
|
||||
$table = new xmldb_table('external_services');
|
||||
|
||||
@ -2551,10 +2551,10 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
$dbman->create_table($table);
|
||||
|
||||
/// Main savepoint reached
|
||||
upgrade_main_savepoint($result, 2009091308);
|
||||
upgrade_main_savepoint($result, 2009100603);
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2009091309) {
|
||||
if ($result && $oldversion < 2009100604) {
|
||||
/// Define table external_services_functions to be created
|
||||
$table = new xmldb_table('external_services_functions');
|
||||
|
||||
@ -2571,10 +2571,10 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
$dbman->create_table($table);
|
||||
|
||||
/// Main savepoint reached
|
||||
upgrade_main_savepoint($result, 2009091309);
|
||||
upgrade_main_savepoint($result, 2009100604);
|
||||
}
|
||||
|
||||
if ($result && $oldversion < 2009091310) {
|
||||
if ($result && $oldversion < 2009100605) {
|
||||
/// Define table external_services_users to be created
|
||||
$table = new xmldb_table('external_services_users');
|
||||
|
||||
@ -2582,6 +2582,9 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
$table->add_field('id', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
|
||||
$table->add_field('externalserviceid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
|
||||
$table->add_field('userid', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, XMLDB_NOTNULL, null, null);
|
||||
$table->add_field('iprestriction', XMLDB_TYPE_CHAR, '255', null, null, null, null);
|
||||
$table->add_field('validuntil', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);
|
||||
$table->add_field('timecreated', XMLDB_TYPE_INTEGER, '10', XMLDB_UNSIGNED, null, null, null);
|
||||
|
||||
/// Adding keys to table external_services_users
|
||||
$table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
|
||||
@ -2592,7 +2595,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
|
||||
$dbman->create_table($table);
|
||||
|
||||
/// Main savepoint reached
|
||||
upgrade_main_savepoint($result, 2009091310);
|
||||
upgrade_main_savepoint($result, 2009100605);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2009100600; // YYYYMMDD = date of the last version bump
|
||||
$version = 2009100605; // YYYYMMDD = date of the last version bump
|
||||
// XX = daily increments
|
||||
|
||||
$release = '2.0 dev (Build: 20091006)'; // Human-friendly version name
|
||||
|
Loading…
x
Reference in New Issue
Block a user