From 3ad33dbc046099b3ae1cdc168d5de937f94c2aa6 Mon Sep 17 00:00:00 2001 From: Anh Nhan Nguyen Date: Sat, 16 Mar 2013 11:44:01 -0400 Subject: [PATCH] Profile Pictures can only be edited for System Agents Summary: I feel pretty disturbed by having the thought of admins, super-beings among all users, being able to edit my profile picture. So I took away that capability of theirs. Test Plan: Tried to edit a sys agent's profile pic, and somebody else's. Reviewers: epriestley, chad, btrahan, Afaque_Hussain Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5358 --- .../people/controller/PhabricatorPeopleEditController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/people/controller/PhabricatorPeopleEditController.php b/src/applications/people/controller/PhabricatorPeopleEditController.php index b1364c0780..3ac39fdfcd 100644 --- a/src/applications/people/controller/PhabricatorPeopleEditController.php +++ b/src/applications/people/controller/PhabricatorPeopleEditController.php @@ -54,7 +54,9 @@ final class PhabricatorPeopleEditController pht('View Profile'), '/p/'.$user->getUsername().'/'); $nav->addLabel(pht('Special')); $nav->addFilter('rename', pht('Change Username')); - $nav->addFilter('picture', pht('Set Account Picture')); + if ($user->getIsSystemAgent()) { + $nav->addFilter('picture', pht('Set Account Picture')); + } $nav->addFilter('delete', pht('Delete User')); if (!$user->getID()) {