diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2008-12-13 19:49:33 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-13 19:49:33 +0000 |
| commit | 8ba5ea3cf832f42e93e98c3b984962ace3abf2d1 (patch) | |
| tree | ad44d2124cb4ae3f898cc4df2e6f45751805ac8d /core/helpers/access.php | |
| parent | 65e237a59a99d7c5e8c32cdc7c730414f6dea30f (diff) | |
Make sure that access::can fails if the item is not loaded
Diffstat (limited to 'core/helpers/access.php')
| -rw-r--r-- | core/helpers/access.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/helpers/access.php b/core/helpers/access.php index f3880b89..3fb7548d 100644 --- a/core/helpers/access.php +++ b/core/helpers/access.php @@ -99,6 +99,10 @@ class access_Core { * @return boolean */ public static function can($perm_name, $item) { + if (!$item->loaded) { + return false; + } + if ($perm_name == "view") { $resource = $item; } else { |
