summaryrefslogtreecommitdiff
path: root/httemplate/browse/access_group.html
diff options
context:
space:
mode:
authorivan <ivan>2006-06-18 12:54:49 +0000
committerivan <ivan>2006-06-18 12:54:49 +0000
commitc738a3c4923774b64960aa87fa58bd0751487edb (patch)
treee037c5c2e1211dd16c8024f16c9ce4d1fe589efb /httemplate/browse/access_group.html
parentaaad08cae3a0d46d012de5b78360101cda836c30 (diff)
ACLs: finish group edit (agents + rights) & browse
Diffstat (limited to 'httemplate/browse/access_group.html')
-rw-r--r--httemplate/browse/access_group.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/httemplate/browse/access_group.html b/httemplate/browse/access_group.html
index 6ba89ea81..9ebb2b882 100644
--- a/httemplate/browse/access_group.html
+++ b/httemplate/browse/access_group.html
@@ -4,6 +4,45 @@ my $html_init =
"Internal access groups control access to the back-office interface.<BR><BR>".
qq!<A HREF="${p}edit/access_group.html"><I>Add an internal access group</I></A><BR><BR>!;
+#false laziness w/access_user.html & agent_type.cgi
+my $agents_sub = sub {
+ my $access_group = shift;
+
+ [ map {
+ my $access_groupagent = $_;
+ my $agent = $access_groupagent->agent;
+ [
+ {
+ 'data' => $agent->agent,
+ 'align' => 'left',
+ 'link' => $p. 'edit/agent.cgi?'. $agent->agentnum,
+ },
+ ];
+ }
+ grep { $_->agent } #?
+ $access_group->access_groupagent,
+
+ ];
+
+};
+
+my $rights_sub = sub {
+ my $access_group = shift;
+
+ [ map { my $access_right = $_;
+ [
+ {
+ 'data' => $access_right->rightname,
+ 'align' => 'left',
+ },
+ ];
+ }
+ $access_group->access_rights,
+
+ ];
+
+};
+
my $count_query = 'SELECT COUNT(*) FROM access_group';
my $link = [ $p.'edit/access_group.html?', 'groupnum' ];
@@ -22,12 +61,18 @@ my $link = [ $p.'edit/access_group.html?', 'groupnum' ];
'count_query' => $count_query,
'header' => [ '#',
'Group name',
+ 'Agents',
+ 'Rights',
],
'fields' => [ 'groupnum',
'groupname',
+ $agents_sub,
+ $rights_sub,
],
'links' => [ $link,
$link,
+ '',
+ '',
],
)
%>