aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ManaTools/Module
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ManaTools/Module')
-rw-r--r--lib/ManaTools/Module/Users.pm40
1 files changed, 23 insertions, 17 deletions
diff --git a/lib/ManaTools/Module/Users.pm b/lib/ManaTools/Module/Users.pm
index 81b6108c..9e04a2a5 100644
--- a/lib/ManaTools/Module/Users.pm
+++ b/lib/ManaTools/Module/Users.pm
@@ -83,8 +83,17 @@ with 'ManaTools::LoggingRole';
has 'configDir' => (
is => 'ro',
isa => 'Str',
+ lazy => 1,
+ builder => '_configDirBuilder',
);
+sub _configDirBuilder {
+ my $self = shift();
+ my $confDir = $self->commandline()->conf_dir() || $self->defaultConfigDir();
+
+ return $confDir;
+}
+
with 'ManaTools::ConfigDirRole';
has 'moduleName' => (
@@ -180,25 +189,22 @@ sub _SharedUGUIInitialize {
}
-#=============================================================
-
-=head1 METHODS
-
-=cut
-
-=head2 new - additional parameters
-
-=head3 config_file
+# configuration file name
+has 'config_file' => (
+ is => 'ro',
+ isa => 'Str',
+ lazy => 1,
+ init_arg => undef,
+ builder => '_config_fileBuilder',
+);
- optional parameter to set the configuration file name
+sub _config_fileBuilder {
+ my $self = shift();
+ my $confDir = $self->configPathName();
-=cut
+ return $confDir . "/manauser";
+}
-has 'config_file' => (
- is => 'rw',
- isa => 'Str',
- default => '/etc/sysconfig/manauser',
-);
#=============================================================
@@ -2519,7 +2525,7 @@ sub _manageUsersDialog {
my $sysfilter = 1;
if (-e $self->config_file) {
my $prefs = Config::Auto::parse($self->config_file);
- $sysfilter = ($prefs->{FILTER} eq 'true' or $prefs->{FILTER} eq 'true' or $prefs->{FILTER} eq '1');
+ $sysfilter = ($prefs->{FILTER} eq 'true' or $prefs->{FILTER} eq 'TRUE' or $prefs->{FILTER} eq '1');
}
$self->set_widget(filter_system => $factory->createCheckBox($head_align_left, $self->loc->N("Filter system users"),
$sysfilter));