ManaTools::Module::Users

Section: User Contributed Perl Documentation (3)
Updated: 2017-07-06
Page Index
 

NAME

ManaTools::Module::Users - This module aims to manage service
                               with GUI  

SYNOPSIS

    my $userManager = ManaTools::Module::Users->new();
    $userManager->start();

 

DESCRIPTION

    This module is a tool to manage users on the system.

    From the original code adduserdrake and userdrake.

 

SUPPORT

    You can find documentation for this module with the perldoc command:

    perldoc ManaTools::Module::Users

 

SEE ALSO

   ManaTools::Module

 

AUTHOR

Angelo Naselli <anaselli@linux.it>  

COPYRIGHT and LICENSE

Copyright (C) 2013-2016, Angelo Naselli.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA  

configName

INPUT

    $self: this object

OUTPUT

    name: module name

DESCRIPTION

    Returns the module name as configuration subdirectory.
    This method is required by ConfigDirRole

 

start

INPUT

    $self: this object

DESCRIPTION

    This method extends Module::start and is invoked to
    start  adminService

 

BUILD

INPUT

    $self: this object

DESCRIPTION

    The BUILD method is called after a Moose object is created,
    Into this method additional data are initialized.

 

ChooseGroup

INPUT

    $self: this object

OUTPUT

    $choice: 0 or 1 (choice)
            -1 cancel or exit

DESCRIPTION

creates a popup dialog to ask if adding user to an existing group or to the 'users' group  

_deleteGroupDialog

INPUT

    $self: this object

DESCRIPTION

    This method open a dialog to delete the selected group.

 

_deleteUserDialog

INPUT

    $self: this object

DESCRIPTION

    This method open a dialog to delete the selected user.
    It also asks for additional information to be removed.

 

_buildUserData

INPUT

    $self:    this object
    $layout : layout in wich drawing graphic user data

OUTPUT

    $userData: hash reference containing reference to graphical object
               such as:
               full_name, login_name, password, password1,
               login_shell
               full_name, login_name, password, password1,
               weakness (icon), login_shell

DESCRIPTION

    This method is used by addUserDialog and _editUserDialog
    to create User Data dialog

 

addUserDialog

INPUT

    $self:       this object
    $standalone: if set the application title is set
                 from the name set in costructor

DESCRIPTION

    This method creates and manages the dialog to add a new
    user.

 

_createUserTable

INPUT

    $self: this object

DESCRIPTION

This function create the User table to be added to the replace point of the tab widget. Note this function is meant for internal use only  

_createGroupTable

INPUT

    $self: this object

DESCRIPTION

This function create the Group table to be added to the replace point of the tab widget. Note this function is meant for internal use only  

_refreshUsers

INPUT

    $self: this object

DESCRIPTION

    This method refresh user info into User tab widget.
    Note this function is meant for internal use only

 

_refreshGroups

INPUT

    $self: this object

DESCRIPTION

    This method refresh group info into Group tab widget.
    Note this function is meant for internal use only

 

_getUserInfo

INPUT

    $self: this object

OUTPUT

    $userData: HASH reference containing:
                username:      username
                full_name:      full name of user
                shell:         shell used
                homedir:       home dir path
                UID:           User identifier
                acc_check_exp: account expiration enabling
                acc_expy:      account expiration year
                acc_expm:      account expiration month
                acc_expd:      account expiration day
                lockuser:      account locked
                pwd_check_exp: password expiration enabling
                pwd_exp_min:   days before changing password
                               is allowed
                pwd_exp_max:   days before changing password
                               is required
                pwd_exp_warn:  warning days before changing
                pwd_exp_inact: days before account becomes
                               inact
                members:       Array containing groups the user
                               belongs to.
                primary_group: primary group ID for the user

DESCRIPTION

    Retrieves the selected user info from the system
    Note that acc_expy,  acc_expm and acc_expd are valid if
    acc_check_exp is enabled.
    Note that pwd_exp_min, pwd_exp_max, pwd_exp_warn,
    pwd_exp_inact are valid if pwd_check_exp is enabled.

 

_getUserInfo

INPUT

    $self: this object

OUTPUT

    %groupData:  selected group info as:
        $groupname:  group name
        $members:    users that are members of this group

DESCRIPTION

    Retrieves the selected group info from the system

 

_userDataTabWidget

INPUT

    $self:        this object
    $dialog:      YUI dialog that owns the YUI replace point
    $replace_pnt: YUI replace point, needed to add a new tab
                  widget
    $userData:    hash reference containing user data info, tabs are
                  removed and added again on selection, so
                  data must be saved outside of widgets.

OUTPUT

    $userDataWidget: hash containing new YUI widget objects
                     such as:
                     returned onject from _buildUserData and
                     homedir.

DESCRIPTION

    This internal method removes old tab widget saving its
    relevant data into userData and creates new selected table
    to be shown.

 

_groupDataTabWidget

INPUT

    $self:        this object
    $dialog:      YUI dialog that owns the YUI replace point
    $replace_pnt: YUI replace point, needed to add a new tab
                  widget
    %groupData:   hash containing group data info, tabs are
                  removed and added again on selection, so
                  data must be saved outside of widgets.
    $previus_tab: previous tab widget label, needed to store
                  group data from the old tab before removing
                  it, if user changed something.

OUTPUT

    %groupDataWidget: hash containing new YUI widget objects
                      such as:
                       groupname.

DESCRIPTION

    This internal method removes old tab widget saving its
    relevant data into groupData and creates new selected table
    to be shown.

 

_skipShortcut

INPUT

    $self:  this object
    $label: an item label to be cleaned by keyboard shortcut "&"

OUTPUT

    $label: cleaned label

DESCRIPTION

    This internal method is a workaround to label that are
    changed by "&" due to keyborad shortcut.


 

Index

NAME
SYNOPSIS
DESCRIPTION
SUPPORT
SEE ALSO
AUTHOR
COPYRIGHT and LICENSE
configName
start
BUILD
ChooseGroup
_deleteGroupDialog
_deleteUserDialog
_buildUserData
addUserDialog
_createUserTable
_createGroupTable
_refreshUsers
_refreshGroups
_getUserInfo
_getUserInfo
_userDataTabWidget
_groupDataTabWidget
_skipShortcut
LinuxReviews : manual page archive : man3pm