Changed to ensure that the grid view menu items do not show up at all, unless the user is an admin

git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@779 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-25 06:24:27 +00:00
parent 85b189a50e
commit 0758865aae

View File

@@ -27,6 +27,12 @@ class TransactionsController extends AppController {
$this->addSideMenuLink('All',
array('controller' => 'transactions', 'action' => 'all'), null,
'CONTROLLER');
// REVISIT <AP>: 20090824
// Right now, we wish to keep things simple. Don't make these
// links available to non-admin users.
if (empty($this->params['admin']))
$this->sideMenuEnable('CONTROLLER', $this->std_area, false);
}
@@ -42,8 +48,6 @@ class TransactionsController extends AppController {
function invoice() { $this->gridView('Invoices'); }
function receipt() { $this->gridView('Receipts'); }
function deposit() {
if (empty($this->params['admin']))
$this->sideMenuEnable('CONTROLLER', $this->std_area, false);
$this->addSideMenuLink('New Deposit',
array('controller' => 'tenders', 'action' => 'deposit'), null,
'ACTION', $this->new_area);