summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2007-09-24 00:56:50 +0000
committerivan <ivan>2007-09-24 00:56:50 +0000
commit91caf036bc222d20d078e31f1d28c2d6c86805e1 (patch)
tree80a89433fd9dee9d2655e4b222d9988e5675525b /httemplate
parent308f86b554046bcf4a9e793465ad3a4cd0e0962d (diff)
beginning of agent-virtualization of packages
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/browse/part_pkg.cgi11
1 files changed, 9 insertions, 2 deletions
diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi
index 0b83fc000..40f6b3d71 100755
--- a/httemplate/browse/part_pkg.cgi
+++ b/httemplate/browse/part_pkg.cgi
@@ -5,6 +5,9 @@
'name' => 'package definitions',
'disableable' => 1,
'disabled_statuspos' => 3,
+ 'agent_virt' => 1,
+ 'agent_null_right' => 'Edit global package definitions',
+ 'agent_pos' => 4,
'query' => { 'select' => $select,
'table' => 'part_pkg',
'hashref' => {},
@@ -20,7 +23,8 @@
<%init>
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
+ unless $FS::CurrentUser::CurrentUser->access_right('Edit package definitions')
+ || $FS::CurrentUser::CurrentUser->access_right('Edit global package definitions');
my $select = '*';
my $orderby = 'pkgpart';
@@ -220,6 +224,9 @@ $align .= 'lrl'; #rr';
# --------
-my $count_query = 'SELECT COUNT(*) FROM part_pkg';
+my $count_query = 'SELECT COUNT(*) FROM part_pkg WHERE '.
+ $FS::CurrentUser::CurrentUser->agentnums_sql(
+ 'null_right' => 'Edit global package definitions',
+ );
</%init>