don't show the backup link if the user can't backup

This commit is contained in:
Evan Prodromou 2010-12-13 16:49:01 -05:00
parent 5089d3065c
commit 6a7bf9dbf9
1 changed files with 7 additions and 3 deletions

View File

@ -454,11 +454,15 @@ class ProfilesettingsAction extends AccountSettingsAction
} }
function showAside() { function showAside() {
$user = common_current_user();
$this->elementStart('div', array('id' => 'aside_primary', $this->elementStart('div', array('id' => 'aside_primary',
'class' => 'aside')); 'class' => 'aside'));
$this->element('a', if ($user->hasRight(Right::BACKUPACCOUNT)) {
array('href' => common_local_url('backupaccount')), $this->element('a',
_('Backup account')); array('href' => common_local_url('backupaccount')),
_('Backup account'));
}
$this->elementEnd('div'); $this->elementEnd('div');
} }
} }