summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authormark <mark>2010-10-04 22:17:22 +0000
committermark <mark>2010-10-04 22:17:22 +0000
commit22136ecc8353ff82c9a402218ce849db6cf05dab (patch)
tree209f07565e700c1749ac6645768c9513b0dc7bd8 /FS
parent594f6993d818db68b15ecfb6c339e5d23be50950 (diff)
fs_ system accounts, RT#8731
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