[freeside-commits] freeside/httemplate/edit/process access_user.html, 1.9, 1.10
Mark Wells
mark at wavetail.420.am
Mon Oct 4 15:17:25 PDT 2010
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv20622/httemplate/edit/process
Modified Files:
access_user.html
Log Message:
fs_ system accounts, RT#8731
Index: access_user.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/access_user.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -w -d -r1.9 -r1.10
--- access_user.html 6 Jun 2010 06:29:36 -0000 1.9
+++ access_user.html 4 Oct 2010 22:17:22 -0000 1.10
@@ -10,6 +10,7 @@
'process_m2m' => { 'link_table' => 'access_usergroup',
'target_table' => 'access_group',
},
+ 'precheck_callback'=> \&precheck_callback,
)
%>
% }
@@ -23,4 +24,13 @@
die "shouldn't be reached";
}
+sub precheck_callback {
+ my $cgi = shift;
+ my $o = FS::access_user->new({username => $cgi->param('username')});
+ if( $o->is_system_user and !$cgi->param('usernum') ) {
+ $cgi->param('username','');
+ return "username '".$o->username."' reserved for system account."
+ }
+ return '';
+}
</%init>
More information about the freeside-commits
mailing list