mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 00:02:41 +01:00
11fbd213b1
Summary: Ref T603. This isn't remotely usable yet, but I wanted to get any feedback before I build it out anymore. I think this is a reasonable interface for defining custom policies? It's basically similar to Herald, although it's a bit simpler. I imagine users will rarely interact with this, but this will service the high end of policy complexity (and allow the definition of things like "is member of LDAP group" or whatever). Test Plan: See screenshots. Reviewers: btrahan, chad Reviewed By: btrahan CC: aran, asherkin Maniphest Tasks: T603 Differential Revision: https://secure.phabricator.com/D7217
24 lines
473 B
PHP
24 lines
473 B
PHP
<?php
|
|
|
|
final class PhabricatorApplicationPolicy extends PhabricatorApplication {
|
|
|
|
public function shouldAppearInLaunchView() {
|
|
return false;
|
|
}
|
|
|
|
public function canUninstall() {
|
|
return false;
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/policy/' => array(
|
|
'explain/(?P<phid>[^/]+)/(?P<capability>[^/]+)/'
|
|
=> 'PhabricatorPolicyExplainController',
|
|
'edit/' => 'PhabricatorPolicyEditController',
|
|
),
|
|
);
|
|
}
|
|
|
|
}
|
|
|