1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-31 17:08:22 +01:00
phorge-phorge/src/applications/repository
Andre Klapper 90f651d669 Add Diffusion policy capability "Can Edit and View Identities"
Summary:
Make it possible not to allow anyone to edit Diffusion identities.
Make it possible not to allow anyone to view other users' email addresses.

Closes T15443

Test Plan:
* As an admin, go to `/applications/view/PhabricatorDiffusionApplication/` and see new policy "Can Edit and View Identities" set to "All Users" (as implicitly before)
* As an admin, go to `/applications/view/PhabricatorDiffusionApplication/` and change "Can Edit and View Identities" from "All Users" to "Administrators"
* As a non-admin, go to `/diffusion/identity/` and try to select the disabled "Create Identity" button; get an error message clicking it due to lack of permissions
* Given there is at least one identity defined, as a non-admin, go directly to `/diffusion/identity/view/1/` and get "You do not have permission to view this object."
* Given there is at least one identity defined, as a non-admin, go directly to `/diffusion/identity/edit/1/` and get "You do not have permission to view this object."
* As a non-admin, go directly to `/diffusion/identity/edit/form/default/` and get "You do not have permission to edit this object."
* As a non-admin, go directly to `/diffusion/identity/` and get "No Identities found." instead of seeing the existing identities listed.
* As an admin, go to `/diffusion/identity/` and still see the existing identities listed.
* As an admin, go to `/diffusion/identity/`, select "Create Identity" to go to `/diffusion/identity/edit/` and see the "Create Identity" page (though broken; see T15453)
* As an admin, go to `/diffusion/identity/view/1/` and still see the existing identity.
* As an admin, go to `/diffusion/identity/edit/1/` and successfully edit the existing identity.

Reviewers: O1 Blessed Committers, speck, valerio.bozzolan

Reviewed By: O1 Blessed Committers, speck, valerio.bozzolan

Subscribers: speck, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15443

Differential Revision: https://we.phorge.it/D25450
2023-11-11 13:27:11 +01:00
..
capability Add Diffusion policy capability "Can Edit and View Identities" 2023-11-11 13:27:11 +01:00
codex When destorying a repository, print a notification about removing the working copy 2017-08-01 08:57:39 -07:00
conduit Update Diffusion conduit text 2017-07-02 14:25:10 +00:00
config Remove product literal strings in "pht()", part 22 2022-04-25 16:46:26 -07:00
constants Simplify Create Repository page 2017-08-15 11:05:50 -07:00
customfield Move various other callsites away from callsigns 2016-01-04 06:54:42 -08:00
daemon Add support to marking commits as UNREACHABLE for Mercurial 2021-09-04 19:05:08 -04:00
data Collapse repository URI normalization code into Arcanist 2020-06-30 15:54:33 -07:00
editor Fix PHP 8.1 "strlen(null)" and "preg_match()" exceptions which block repository creation 2023-05-19 17:18:37 +02:00
engine Add Diffusion policy capability "Can Edit and View Identities" 2023-11-11 13:27:11 +01:00
graphcache Bail out of PhabricatorRepositoryGraphCache more aggressively after cache fills 2017-10-06 14:12:58 -07:00
mail Build separate mail for each recipient, honoring recipient access levels 2015-06-03 18:59:31 -07:00
management Fix PHP 8.1 "strlen(null)" exception trying to stop maintenance mode of Diffusion repo 2023-07-18 09:06:25 +01:00
phid Remove "State Icons" from handles 2019-10-31 12:04:43 -07:00
query Implement ferret engine in typeahead datasource query for repos 2023-09-04 09:48:41 +02:00
response Return Git HTTP error messages in an HTTP header 2021-01-26 16:14:03 -08:00
search Implement ferret engine in typeahead datasource query for repos 2023-09-04 09:48:41 +02:00
storage Add Diffusion policy capability "Can Edit and View Identities" 2023-11-11 13:27:11 +01:00
worker Correct spelling mistakes 2023-05-27 22:19:06 +01:00
xaction Fix PHP 8.1 "strlen(null)" exception on History page of Diffusion repo after setting maintenance mode 2023-07-05 19:41:51 +02:00