apps/permissions/lib/Action/Delete.php

Go to the documentation of this file.
00001 <?php
00003 // {{{ license
00004 
00005 // +----------------------------------------------------------------------+
00006 // | FastFrame Application Framework                                      |
00007 // +----------------------------------------------------------------------+
00008 // | Copyright (c) 2002-2006 The Codejanitor Group                        |
00009 // +----------------------------------------------------------------------+
00010 // | This source file is subject to the GNU Lesser Public License (LGPL), |
00011 // | that is bundled with this package in the file LICENSE, and is        |
00012 // | available at through the world-wide-web at                           |
00013 // | http://www.fsf.org/copyleft/lesser.html                              |
00014 // | If you did not receive a copy of the LGPL and are unable to          |
00015 // | obtain it through the world-wide-web, you can get it by writing the  |
00016 // | Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
00017 // | MA 02111-1307, USA.                                                  |
00018 // +----------------------------------------------------------------------+
00019 // | Authors: Jason Rust <jrust@codejanitor.com>                          |
00020 // +----------------------------------------------------------------------+
00021 
00022 // }}}
00023 // {{{ requires
00024 
00025 require_once FASTFRAME_ROOT . 'lib/FastFrame/Action/Delete.php';
00026 
00027 // }}}
00028 // {{{ class FF_Action_Delete_Permissions
00029 
00039 // }}}
00040 class FF_Action_Delete_Permissions extends FF_Action_Delete {
00041     // {{{ getSingularText()
00042 
00049     function getSingularText()
00050     {
00051         return _('permission group');
00052     }
00053 
00054     // }}}
00055     // {{{ checkPerms()
00056 
00063     function checkPerms()
00064     {
00065         if (!$this->o_perms->hasPerm('can_delete')) {
00066             $this->o_nextAction->setNextActionId(ACTION_PROBLEM);
00067             $this->o_output->setMessage(_('You do not have permission to delete permission groups.'), FASTFRAME_ERROR_MESSAGE);
00068             return false;
00069         }
00070         else {
00071             return true;
00072         }
00073     }
00074 
00075     // }}}
00076 }
00077 ?>

Generated on Fri Jun 23 11:38:15 2006 for FastFrame by  doxygen 1.4.4