diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-06 15:45:03 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-06-06 15:45:03 -0700 |
| commit | 097ef934c6fe188cc368905ee72b7cca6ad2f755 (patch) | |
| tree | 75e92a4edf717f2a6828a802f45485af06af3c71 /modules/rest/helpers/rest.php | |
| parent | c4d85721fc0a3b9aad45451fb917d6e23b804c05 (diff) | |
| parent | aeee88031fed7029c3320800d237b69993e8b6d4 (diff) | |
Merge branch 'master' into talmdal_dev
Diffstat (limited to 'modules/rest/helpers/rest.php')
| -rw-r--r-- | modules/rest/helpers/rest.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/rest/helpers/rest.php b/modules/rest/helpers/rest.php index 49999520..72927c71 100644 --- a/modules/rest/helpers/rest.php +++ b/modules/rest/helpers/rest.php @@ -39,7 +39,12 @@ class rest_Core { static function set_active_user($access_key) { if (empty($access_key)) { - throw new Rest_Exception("Forbidden", 403); + if (module::get_var("rest", "allow_guest_access")) { + identity::set_active_user(identity::guest()); + return; + } else { + throw new Rest_Exception("Forbidden", 403); + } } $key = ORM::factory("user_access_key") |
