From: Evan Prodromou Date: Mon, 13 Dec 2010 21:49:01 +0000 (-0500) Subject: don't show the backup link if the user can't backup X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6a7bf9dbf97a86881181d070894b0586d9d34129;p=quix0rs-gnu-social.git don't show the backup link if the user can't backup --- diff --git a/actions/profilesettings.php b/actions/profilesettings.php index 17ffdf811b..4890a575b1 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'); } }