Re: [pve-devel] [PATCH access-control] pveum: Allow listing of roles and their privileges

2017-09-25 Thread Alwin Antreich
On Mon, Sep 25, 2017 at 10:19:50AM +0200, Philip Abernethy wrote: > On Mon, Sep 25, 2017 at 10:13:29AM +0200, Thomas Lamprecht wrote: > > On 09/25/2017 07:05 AM, Dietmar Maurer wrote: > > > > > > > + sub { > > > > + my ($res) = @_; > > > > + my $longest = 0; > > > > +

Re: [pve-devel] [PATCH access-control] pveum: Allow listing of roles and their privileges

2017-09-25 Thread Wolfgang Bumiller
On Mon, Sep 25, 2017 at 07:05:03AM +0200, Dietmar Maurer wrote: > comments inline > > > Use the existing 'index' API call from PVE::API2::Role to produce a > > tidy list of all available roles and their associated privileges. > > --- > > Concerns #1502 but doesn't fix it completely. > > PVE/CLI/p

Re: [pve-devel] [PATCH access-control] pveum: Allow listing of roles and their privileges

2017-09-25 Thread Philip Abernethy
On Mon, Sep 25, 2017 at 10:13:29AM +0200, Thomas Lamprecht wrote: > On 09/25/2017 07:05 AM, Dietmar Maurer wrote: > > > > > + sub { > > > + my ($res) = @_; > > > + my $longest = 0; > > > + foreach my $role(map($_->{roleid}, @$res)) { > > > + my $len = length $role; > > > +

Re: [pve-devel] [PATCH access-control] pveum: Allow listing of roles and their privileges

2017-09-25 Thread Thomas Lamprecht
On 09/25/2017 07:05 AM, Dietmar Maurer wrote: + sub { + my ($res) = @_; + my $longest = 0; + foreach my $role(map($_->{roleid}, @$res)) { + my $len = length $role; + $longest = $len if $len > $longest; + } + $lo

Re: [pve-devel] [PATCH access-control] pveum: Allow listing of roles and their privileges

2017-09-24 Thread Thomas Lamprecht
On 09/25/2017 07:05 AM, Dietmar Maurer wrote: comments inline Use the existing 'index' API call from PVE::API2::Role to produce a tidy list of all available roles and their associated privileges. --- Concerns #1502 but doesn't fix it completely. PVE/CLI/pveum.pm | 31 +

Re: [pve-devel] [PATCH access-control] pveum: Allow listing of roles and their privileges

2017-09-24 Thread Dietmar Maurer
comments inline > Use the existing 'index' API call from PVE::API2::Role to produce a > tidy list of all available roles and their associated privileges. > --- > Concerns #1502 but doesn't fix it completely. > PVE/CLI/pveum.pm | 31 +++ > 1 file changed, 31 insertions(

[pve-devel] [PATCH access-control] pveum: Allow listing of roles and their privileges

2017-09-22 Thread Philip Abernethy
Use the existing 'index' API call from PVE::API2::Role to produce a tidy list of all available roles and their associated privileges. --- Concerns #1502 but doesn't fix it completely. PVE/CLI/pveum.pm | 31 +++ 1 file changed, 31 insertions(+) diff --git a/PVE/CLI/pveu