summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/access_user.pm24
1 files changed, 21 insertions, 3 deletions
diff --git a/FS/FS/access_user.pm b/FS/FS/access_user.pm
index 72e914068..075733a68 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 (
@@ -512,6 +511,25 @@ sub default_customer_view {
}
+=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