diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-06-05 19:45:15 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-06-05 19:45:15 -0700 |
commit | 481ef823dd04daff736b5a98472322e28bd4e756 (patch) | |
tree | 0e15aebc09bf32dbf5ed6c0b5b1086cf5af877a2 /modules/rest/helpers/rest_installer.php | |
parent | 110350776d5bda3b8535f0329ea69b914daa8019 (diff) |
Add an advanced setting to allow developers to allow guest access to
REST entities.
Diffstat (limited to 'modules/rest/helpers/rest_installer.php')
-rw-r--r-- | modules/rest/helpers/rest_installer.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/rest/helpers/rest_installer.php b/modules/rest/helpers/rest_installer.php index aeb9573e..c2694a29 100644 --- a/modules/rest/helpers/rest_installer.php +++ b/modules/rest/helpers/rest_installer.php @@ -28,7 +28,8 @@ class rest_installer { UNIQUE KEY(`access_key`), UNIQUE KEY(`user_id`)) DEFAULT CHARSET=utf8;"); - module::set_version("rest", 2); + module::set_var("rest", "allow_guest_access", false); + module::set_version("rest", 3); } static function upgrade($version) { @@ -37,6 +38,11 @@ class rest_installer { $db->query("RENAME TABLE {user_access_tokens} TO {user_access_keys}"); module::set_version("rest", $version = 2); } + + if ($version == 2) { + module::set_var("rest", "allow_guest_access", false); + module::set_version("rest", $version = 3); + } } static function uninstall() { |