[freeside-commits] freeside/FS/FS access_user.pm,1.9,1.10
Ivan,,,
ivan at wavetail.420.am
Fri Sep 29 10:22:24 PDT 2006
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail:/tmp/cvs-serv25190
Modified Files:
access_user.pm
Log Message:
fix problem with viewing unlinked services
Index: access_user.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/access_user.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- access_user.pm 14 Aug 2006 08:38:08 -0000 1.9
+++ access_user.pm 29 Sep 2006 17:22:22 -0000 1.10
@@ -298,12 +298,13 @@
sub agentnums_sql {
my $self = shift;
- my @agentnums = $self->agentnums;
- return ' 1 = 0 ' unless scalar(@agentnums);
+ my @agentnums = map { "agentnum = $_" } $self->agentnums;
- '( '.
- join( ' OR ', map "agentnum = $_", @agentnums ).
- ' )';
+ push @agentnums, 'agentnum IS NULL'
+ if $self->access_right('View/link unlinked services');
+
+ return ' 1 = 0 ' unless scalar(@agentnums);
+ '( '. join( ' OR ', @agentnums ). ' )';
}
=item agentnum
More information about the freeside-commits
mailing list