From c738a3c4923774b64960aa87fa58bd0751487edb Mon Sep 17 00:00:00 2001 From: ivan Date: Sun, 18 Jun 2006 12:54:49 +0000 Subject: ACLs: finish group edit (agents + rights) & browse --- httemplate/browse/access_group.html | 45 +++++++++++++++++++++++++++++++++++++ httemplate/browse/access_user.html | 2 +- 2 files changed, 46 insertions(+), 1 deletion(-) (limited to 'httemplate/browse') 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.

". qq!Add an internal access group

!; +#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, + '', + '', ], ) %> diff --git a/httemplate/browse/access_user.html b/httemplate/browse/access_user.html index 38d5430b1..be11bf82a 100644 --- a/httemplate/browse/access_user.html +++ b/httemplate/browse/access_user.html @@ -4,7 +4,7 @@ my $html_init = "Internal users have access to the back-office interface. Typically, this is your employees and contractors, but in a VISP setup, you can also add accounts for your reseller's employees. It is highly recommended to add a separate account for each person rather than using role accounts.

". qq!Add an internal user

!; -#false laziness w/agent_type.cgi +#false laziness w/access_group.html & agent_type.cgi my $groups_sub = sub { my $access_user = shift; -- cgit v1.2.1