diff options
author | ivan <ivan> | 2010-06-17 02:08:53 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-06-17 02:08:53 +0000 |
commit | 8966833a87b9a002c9d72c56832e35b55628dc81 (patch) | |
tree | 5ebe5128d453eb940580b1876b2218d1db8d87be /httemplate/browse | |
parent | 259921ee5e89a68fc79b2a358643c558ebb4fdaa (diff) |
Add "View customers of all agents" access rights, RT#7010
Diffstat (limited to 'httemplate/browse')
-rw-r--r-- | httemplate/browse/part_event.html | 3 | ||||
-rwxr-xr-x | httemplate/browse/part_pkg.cgi | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/httemplate/browse/part_event.html b/httemplate/browse/part_event.html index 674004bc7..3d7c245ac 100644 --- a/httemplate/browse/part_event.html +++ b/httemplate/browse/part_event.html @@ -158,7 +158,8 @@ $html_init .= '</SELECT><INPUT TYPE="submit" VALUE="Clone existing event">'. my $count_query = 'SELECT COUNT(*) FROM part_event WHERE '. $FS::CurrentUser::CurrentUser->agentnums_sql( - 'null_right' => 'Edit global billing events', + 'null_right' => 'Edit global billing events', + 'viewall_right' => 'None', ); my $join_conditions = FS::part_event_condition->join_conditions_sql; diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index e226ce13e..42eb5dfcb 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -84,11 +84,11 @@ my $extra_sql = scalar(@where) join( 'AND ', @where) : ''; -my $agentnums = join(',', $curuser->agentnums); +my $agentnums_sql = $curuser->agentnums_sql( 'table'=>'cust_main' ); my $count_cust_pkg = " SELECT COUNT(*) FROM cust_pkg LEFT JOIN cust_main USING ( custnum ) WHERE cust_pkg.pkgpart = part_pkg.pkgpart - AND cust_main.agentnum IN ($agentnums) + AND $agentnums_sql "; $select = " |