1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00
phorge-phorge/webroot/rsrc/css
epriestley b1b1ff83f2 Allow applications to define new policy capabilities
Summary:
Ref T603. I want to let applications define new capabilities (like "can manage global rules" in Herald) and get full support for them, including reasonable error strings in the UI.

Currently, this is difficult for a couple of reasons. Partly this is just a code organization issue, which is easy to fix. The bigger thing is that we have a bunch of strings which depend on both the policy and capability, like: "You must be an administrator to view this object." "Administrator" is the policy, and "view" is the capability.

That means every new capability has to add a string for each policy, and every new policy (should we introduce any) needs to add a string for each capability. And we can't do any piecemeal "You must be a {$role} to {$action} this object" becuase it's impossible to translate.

Instead, make all the strings depend on //only// the policy, //only// the capability, or //only// the object type. This makes the dialogs read a little more strangely, but I think it's still pretty easy to understand, and it makes adding new stuff way way easier.

Also provide more context, and more useful exception messages.

Test Plan:
  - See screenshots.
  - Also triggered a policy exception and verified it was dramatically more useful than it used to be.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: chad, aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D7260
2013-10-07 13:28:58 -07:00
..
aphront Allow applications to define new policy capabilities 2013-10-07 13:28:58 -07:00
application Minor Results table CSS updates 2013-10-07 08:41:01 -07:00
core Make <audio /> work slightly better on devices 2013-09-27 11:13:38 -07:00
diviner Policy, Status in PHUIHeaderView 2013-09-17 09:12:37 -07:00
layout Fix border on Actions List. 2013-10-06 11:12:00 -07:00
phui Tweak status list highlight 2013-10-07 08:57:39 -07:00
sprite-actions.css Add action icons to object list views 2013-05-10 12:57:01 -07:00
sprite-apps-large.css Navbar quick add icons... probably 2013-07-29 07:18:27 -07:00
sprite-apps-xlarge.css Added Feed icons. 2013-01-10 10:00:18 -08:00
sprite-apps.css Navbar quick add icons... probably 2013-07-29 07:18:27 -07:00
sprite-conpherence.css Conpherence - some cleanup type stuff 2013-03-13 13:03:51 -07:00
sprite-docs.css Document icons sprite sheet. 2013-03-10 14:16:16 -07:00
sprite-gradient.css Add objectheaders to new View 2013-09-28 15:55:38 -07:00
sprite-icons.css New icons for Maniphest 2013-09-29 17:53:37 -07:00
sprite-login.css Jira, TwitchTV login icons 2013-08-11 11:00:38 -07:00
sprite-menu.css Mobile "quick create" icons. 2013-07-28 13:47:09 -07:00
sprite-minicons.css PhabricatorActionHeaderView v0 2013-04-05 07:40:27 -07:00
sprite-payments.css Payment sprite icons. 2013-04-22 16:41:00 -07:00
sprite-status.css ObjectHeader Status icons 2013-09-24 08:42:04 -07:00
sprite-tokens.css PHUIIconView 2013-04-19 17:44:20 -07:00