X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Faccess_user.pm;h=5d5cc126cd85cd49d3d560c2c478b5a17518b8f1;hb=404f8f0494ab5fd2ff947bf82d085fed52c126c5;hp=72e9140688716a79c5286cdc38277f93f71366e1;hpb=efa7c9c0233f2c3d1e39d62f17cac30b36f593c4;p=freeside.git diff --git a/FS/FS/access_user.pm b/FS/FS/access_user.pm index 72e914068..5d5cc126c 100644 --- a/FS/FS/access_user.pm +++ b/FS/FS/access_user.pm @@ -132,9 +132,8 @@ sub insert { 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 ( @@ -499,7 +498,7 @@ sub access_right { Returns the default customer view for this user, from the "default_customer_view" user preference, the "cust_main-default_view" config, -or the hardcoded default, "jumbo" (may change to "basics" in the near future). +or the hardcoded default, "basics" (formerly "jumbo" prior to 3.0). =cut @@ -508,8 +507,27 @@ sub default_customer_view { $self->option('default_customer_view') || $conf->config('cust_main-default_view') - || 'jumbo'; #'basics' in 1.9.1? + || 'basics'; #s/jumbo/basics/ starting with 3.0 + +} + +=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