Skip to content

Commit 1c6411c

Browse files
committed
add acl-display command
1 parent 558b10a commit 1c6411c

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

src/Ubiquity/devtools/cmd/Command.php

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -549,11 +549,29 @@ public static function createCommand() {
549549
}
550550

551551
public static function initAcls() {
552-
return new Command('init-acls', '', 'Initialize Acls defined with annotations in controllers.', [
553-
'init:acls',
554-
'initAcls'
552+
return new Command('acl-init', '', 'Initialize Acls defined with annotations in controllers.', [
553+
'acl:init',
554+
'aclInit'
555555
], [], [
556-
'Initialize Acls' => 'Ubiquity initAcls'
556+
'Initialize Acls' => 'Ubiquity aclInit'
557+
], 'security');
558+
}
559+
560+
public static function displayAcls() {
561+
return new Command('acl-display', '', 'Display Acls defined with annotations in controllers.', [
562+
'acl:display',
563+
'aclDisplay'
564+
], [
565+
"v" => Parameter::create("value", "The ACL part to display.", [
566+
'all',
567+
'role',
568+
'resource',
569+
'permission',
570+
'map',
571+
'acl'
572+
], 'acl')
573+
], [
574+
'Display all defined roles with ACL annotations' => 'Ubiquity aclDisplay role'
557575
], 'security');
558576
}
559577

@@ -662,6 +680,7 @@ public static function getCommands() {
662680
self::sendMails(),
663681
self::createCommand(),
664682
self::initAcls(),
683+
self::displayAcls(),
665684
...self::getCustomCommandInfos()
666685
];
667686
}

0 commit comments

Comments
 (0)