]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't show the backup link if the user can't backup
authorEvan Prodromou <evan@status.net>
Mon, 13 Dec 2010 21:49:01 +0000 (16:49 -0500)
committerEvan Prodromou <evan@status.net>
Mon, 13 Dec 2010 21:49:01 +0000 (16:49 -0500)
actions/profilesettings.php

index 17ffdf811b42c3ff72d79ce0c20e05f352262c20..4890a575b107b5e4c9c0ff95a0f19dadaffb9998 100644 (file)
@@ -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');
     }
 }