[freeside-commits] freeside/FS/FS access_user.pm,1.29,1.30

Mark Wells mark at wavetail.420.am
Mon Oct 4 15:17:24 PDT 2010


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv20622/FS/FS

Modified Files:
	access_user.pm 
Log Message:
fs_ system accounts, RT#8731

Index: access_user.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/access_user.pm,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -w -d -r1.29 -r1.30
--- access_user.pm	9 Aug 2010 17:22:59 -0000	1.29
+++ access_user.pm	4 Oct 2010 22:17:22 -0000	1.30
@@ -133,8 +133,7 @@
 sub htpasswd_kludge {
   my $self = shift;
   
-  #awful kludge to skip setting htpasswd for fs_* users
-  return '' if $self->username =~ /^fs_/;
+  return '' if $self->is_system_user;
 
   unshift @_, '-c' unless -e $htpasswd_file;
   if ( 
@@ -512,6 +511,25 @@
 
 }
 
+=item is_system_user
+
+Returns true if this user has the name of a known system account.  These 
+users will not appear in the htpasswd file and can't have passwords set.
+
+=cut
+
+sub is_system_user {
+  my $self = shift;
+  return grep { $_ eq $self->username } ( qw(
+    fs_queue
+    fs_daily
+    fs_selfservice
+    fs_signup
+    fs_bootstrap
+    fs_selfserv
+) );
+}
+
 =back
 
 =head1 BUGS



More information about the freeside-commits mailing list