1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 14:30:56 +01:00
phorge-phorge/webroot/rsrc/css/aphront
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-bars.css Standard colors for progress bars 2013-09-13 08:29:16 -07:00
aphront-notes.css Move #888 and #999 to $lightgreytext 2013-09-02 08:12:18 -07:00
calendar-view.css Move #888 and #999 to $lightgreytext 2013-09-02 08:12:18 -07:00
context-bar.css Misc CSS tweaks, timeline, mobile 2013-09-29 07:26:39 -07:00
dark-console.css Move #888 and #999 to $lightgreytext 2013-09-02 08:12:18 -07:00
dialog-view.css Allow applications to define new policy capabilities 2013-10-07 13:28:58 -07:00
error-view.css More grey text updates 2013-09-02 13:57:48 -07:00
lightbox-attachment.css Move all CSS "z-index" rules to "z-index.css", fix Differential z-index problem 2012-12-30 09:30:21 -08:00
list-filter-view.css Color tweaks for action list, headers 2013-09-03 07:00:06 -07:00
multi-column.css Layout, spacing tweaks for new auth. 2013-06-17 22:03:22 -07:00
notification.css More grey text updates 2013-09-02 13:57:48 -07:00
pager-view.css When pagers aren't connected to an ObjectItemListView, put them in a little box 2013-09-13 14:43:33 -07:00
panel-view.css Add objectheaders to new View 2013-09-28 15:55:38 -07:00
phabricator-nav-view.css Flatten side nav 2013-05-17 09:58:37 -07:00
request-failure-view.css PhabricatorEnv 2011-01-31 11:55:26 -08:00
table-view.css Move #888 and #999 to $lightgreytext 2013-09-02 08:12:18 -07:00
tokenizer.css UIColor Blues and common color integration 2013-09-02 08:10:47 -07:00
tooltip.css Move all CSS "z-index" rules to "z-index.css", fix Differential z-index problem 2012-12-30 09:30:21 -08:00
transaction.css Fix transaction bg color 2013-09-19 14:23:44 -07:00
two-column.css Phriction Redesign 2013-04-11 15:05:50 -07:00
typeahead.css Move #888 and #999 to $lightgreytext 2013-09-02 08:12:18 -07:00