On 09/25/2013 04:25 PM, Amit Saha wrote:
----- Original Message -----
> From: "Dan Callaghan" <dcallagh(a)redhat.com>
> PrettyTable sounds nifty, I'd never heard of it before.
Indeed, would have been handy back when I was working on the client for
PulpDist.
> I'm not sure a table is a good way to represent the rules
though. A rule
> applies either to a particular user, a particular group, or everybody.
> The table view doesn't really make that easy to see (especially for the
> "everybody" case) which is why I had suggested just the plain listing of
> rules.
I am going to push this a little further :-).
I made some changes and now the output is:
+------+----------------+--------+---------+-----------+
| Rule | Permission | User | Group | Everybody |
+------+----------------+--------+---------+-----------+
| 1 | edit_system | user10 | X | X |
| 2 | control_system | user11 | X | X |
| 3 | control_system | X | group12 | X |
+------+----------------+--------+---------+-----------+
How do you find it?
So, ordered by permission and displaying "yes" in the Everybody column
when neither user nor group is specified?
Sounds reasonable to me.
We may want a "show-permissions" command, too. Similar to the one liner
"What are *my* permissions?" we were discussing for the web UI.
Cheers,
Nick.
--
Nick Coghlan
Red Hat Infrastructure Engineering & Development, Brisbane
Testing Solutions Team Lead
Beaker Development Lead (
http://beaker-project.org/)