1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-23 05:01:13 +01:00
phorge-phorge/src/applications/countdown
Andre Klapper 1c59b65421 Dashboards: add capability who can create Dashboards
Summary:
Add a `dashboard.create` capability to allow limiting dashboard creation (and creation of related panels).
This can reduce spam in open Phorge installations in which anyone can create an account while you still want anyone to be able to view existing dashboards.

Closes T15438

Test Plan:
1. As an admin, go to `/applications/view/PhabricatorDashboardApplication/`
2. See only two options "Can Use Application: All Users" and "Can Configure Application: Administrators"
3. Apply patch
4. As an admin, go to `/applications/view/PhabricatorDashboardApplication/` and see the new option "Can Create Dashboards" set to "All Users"
5. As an average user, go to `/dashboard/` and successfully create a new Dashboard
6. As an admin, go to `/applications/edit/PhabricatorDashboardApplication/` and change "Can Create Dashboards" from "All Users" to "Administrators", select "Save Policies" button
7. As an average user, go to `/dashboard/` and see that "Create Dashboard" is disabled
8. As an average user, go to an existing dashboard not created by this user and see that selecting "Edit Dashboard" shows "You do not have permission to edit this object."
9. As an average user, go to the existing dashboard that you created yourself and see that the Edit Policy is set to this user.
10. As an average user, go to the existing dashboard that you created yourself and see that you can still create or add panels.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15438

Differential Revision: https://we.phorge.it/D25270
2023-06-19 12:12:22 +02:00
..
application Countdown: add a capability to decide who can Create 2023-04-23 15:15:50 -05:00
capability Dashboards: add capability who can create Dashboards 2023-06-19 12:12:22 +02:00
conduit Implement countdown.search and countdown.edit 2017-04-13 12:57:10 -07:00
controller Cleanup Countdown manual construction of monograms/uris 2017-04-12 13:33:19 -07:00
editor Countdown: add a capability to decide who can Create 2023-04-23 15:15:50 -05:00
mail Allow multiple mail receivers to react to an individual email 2019-01-16 12:28:02 -08:00
phid Cleanup Countdown manual construction of monograms/uris 2017-04-12 13:33:19 -07:00
query Provide a default "loadPage()" implementation on "CursorPagedPolicyAwareQuery" 2022-05-24 10:18:53 -07:00
remarkup Add some missing type hints 2015-05-05 07:33:00 +10:00
storage Remove "getApplicationTransactionObject()" from ApplicationTransactionInterface 2018-12-20 15:16:19 -08:00
view Cleanup Countdown manual construction of monograms/uris 2017-04-12 13:33:19 -07:00
xaction Reimplement Countdown transactions using Modular Transaction framework 2017-04-13 10:53:57 -07:00