]> git.proxmox.com Git - pve-firewall.git/blobdiff - src/PVE/API2/Firewall/Groups.pm
make group digest stable
[pve-firewall.git] / src / PVE / API2 / Firewall / Groups.pm
index 6d9117b00b9eb009face835c7d898e2f16baea6b..99ea41877cc6196bb504e5945f13bbaff045b41a 100644 (file)
@@ -16,7 +16,7 @@ my $get_security_group_list = sub {
     my ($cluster_conf) = @_;
 
     my $res = [];
-    foreach my $group (keys %{$cluster_conf->{groups}}) {
+    foreach my $group (sort keys %{$cluster_conf->{groups}}) {
        my $data = { 
            group => $group,
        };
@@ -36,6 +36,7 @@ __PACKAGE__->register_method({
     path => '',
     method => 'GET',
     description => "List security groups.",
+    permissions => { user => 'all' },
     parameters => {
        additionalProperties => 0,
        properties => {},
@@ -69,6 +70,9 @@ __PACKAGE__->register_method({
     method => 'POST',
     description => "Create new security group.",
     protected => 1,
+    permissions => {
+       check => ['perm', '/', [ 'Sys.Modify' ]],
+    },
     parameters => {
        additionalProperties => 0,
        properties => {