@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make "user role" editing more clear

Summary: The various interfaces here are in conflict about what a role is and isn't. Make them all consistent.

Test Plan: Edited some users into various roles, verified they reported correctly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1190

Differential Revision: https://secure.phabricator.com/D2415

+37 -9
+32 -9
src/applications/people/controller/edit/PhabricatorPeopleEditController.php
··· 47 47 48 48 $views = array( 49 49 'basic' => 'Basic Information', 50 - 'role' => 'Edit Role', 50 + 'role' => 'Edit Roles', 51 51 'cert' => 'Conduit Certificate', 52 52 ); 53 53 ··· 269 269 'Send "Welcome to Phabricator" email.', 270 270 $welcome_checked)); 271 271 } else { 272 + $roles = array(); 273 + 274 + if ($user->getIsSystemAgent()) { 275 + $roles[] = 'System Agent'; 276 + } 277 + if ($user->getIsAdmin()) { 278 + $roles[] = 'Admin'; 279 + } 280 + if ($user->getIsDisabled()) { 281 + $roles[] = 'Disabled'; 282 + } 283 + 284 + if (!$roles) { 285 + $roles[] = 'Normal User'; 286 + } 287 + 288 + $roles = implode(', ', $roles); 289 + 272 290 $form->appendChild( 273 291 id(new AphrontFormStaticControl()) 274 - ->setLabel('Role') 275 - ->setValue( 276 - $user->getIsSystemAgent() 277 - ? 'System Agent' 278 - : 'Normal User')); 292 + ->setLabel('Roles') 293 + ->setValue($roles)); 279 294 } 280 295 281 296 $form ··· 374 389 ->addCheckbox( 375 390 'is_admin', 376 391 1, 377 - 'Admin: wields absolute power.', 392 + 'Administrator', 378 393 $user->getIsAdmin()) 379 394 ->setDisabled($is_self)) 380 395 ->appendChild( ··· 382 397 ->addCheckbox( 383 398 'is_disabled', 384 399 1, 385 - 'Disabled: can not login.', 400 + 'Disabled', 386 401 $user->getIsDisabled()) 387 - ->setDisabled($is_self)); 402 + ->setDisabled($is_self)) 403 + ->appendChild( 404 + id(new AphrontFormCheckboxControl()) 405 + ->addCheckbox( 406 + 'is_agent', 407 + 1, 408 + 'System Agent (Bot/Script User)', 409 + $user->getIsSystemAgent()) 410 + ->setDisabled(true)); 388 411 389 412 if (!$is_self) { 390 413 $form
+5
src/docs/userguide/users.diviner
··· 44 44 - **can not review diffs or own tasks**; 45 45 - **do not appear in CC tokenzers**. 46 46 47 + Currently, the **System Agent** role for an account can not be changed after the 48 + account is created. This prevents administrators form changing a normal user 49 + into a system agent, retrieving their Conduit certificate, and then changing 50 + them back (which would allow administrators to gain other users' credentials). 51 + 47 52 = Disabled Users = 48 53 49 54 **Disabled Users** are accounts that are no longer active. Generally, when