diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-01 09:57:03 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-01 09:57:03 +0000 |
commit | 5c303aa07ba7512f1e6a1150d118c47d16678c54 (patch) | |
tree | dd0f253bfc74e296589b21dd83c3ab8bcdb01392 /core/controllers | |
parent | 88a70cbc0420c57b5b989e57de0ee69dbb66ecca (diff) |
Add access::reset() so that you can specify your intent to use the
parent's permissions.
Update scaffolding to demonstrate that it works.
Diffstat (limited to 'core/controllers')
-rw-r--r-- | core/controllers/welcome.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index cabaf0a9..71fdcdc4 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -480,4 +480,11 @@ class Welcome_Controller extends Template_Controller { access::deny($group_id, $perm, $item_id); url::redirect("welcome"); } + + public function reset_all_perms($group_id, $item_id) { + foreach (ORM::factory("permission")->find_all() as $perm) { + access::reset($group_id, $perm->name, $item_id); + } + url::redirect("welcome"); + } } |