summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-12-13 16:49:01 -0500
committerEvan Prodromou <evan@status.net>2010-12-13 16:49:01 -0500
commit6a7bf9dbf97a86881181d070894b0586d9d34129 (patch)
tree03f7e4efd5d13cd9bd1c0444e10f10dcda66c28a
parent5089d3065c5b2944e468d821a0afdc0881830445 (diff)
don't show the backup link if the user can't backup
-rw-r--r--actions/profilesettings.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index 17ffdf811..4890a575b 100644
--- a/actions/profilesettings.php
+++ b/actions/profilesettings.php
@@ -454,11 +454,15 @@ class ProfilesettingsAction extends AccountSettingsAction
}
function showAside() {
+ $user = common_current_user();
+
$this->elementStart('div', array('id' => 'aside_primary',
'class' => 'aside'));
- $this->element('a',
- array('href' => common_local_url('backupaccount')),
- _('Backup account'));
+ if ($user->hasRight(Right::BACKUPACCOUNT)) {
+ $this->element('a',
+ array('href' => common_local_url('backupaccount')),
+ _('Backup account'));
+ }
$this->elementEnd('div');
}
}