21#if !defined(ms_security_INCLUDED_) 
   22#define ms_security_INCLUDED_ 
   38namespace matrix_science {
 
   39    class ms_security_options;
 
   40    class ms_security_task;
 
   41    class ms_security_tasks;
 
   47        bool operator() (
const ms_user * t1, 
const ms_user * t2)
 const 
   49            return (t1->getID() < t2->getID());
 
   53    class ms_userSortByLoginName
 
   56        bool operator() (
const ms_user * t1, 
const ms_user * t2)
 const 
   58            return (t1->getName() < t2->getName());
 
   62    class ms_userSortByFullName
 
   65        bool operator() (
const ms_user * t1, 
const ms_user * t2)
 const 
   67            return (t1->getFullName() < t2->getFullName());
 
   71    class ms_groupSortByID
 
   74        bool operator() (
const ms_group * t1, 
const ms_group * t2)
 const 
   76            return (t1->getID() < t2->getID());
 
  106            USERID_SORTBY_ID         = 1,  
 
  107            USERID_SORTBY_LOGINNAME  = 2,  
 
  108            USERID_SORTBY_FULLNAME   = 3  
 
  112        bool addNewUser(
const std::string       sessionID,
 
  114                        const std::string       userName,
 
  115                        const std::string       password,
 
  116                        const time_t            passwordExpiry,
 
  117                        const std::string       fullName,
 
  118                        const std::string       emailAddress,
 
  123        ms_user getUser(
const std::string userName) 
const;
 
  126        ms_user getUserFromID(
const int userID) 
const;
 
  129        bool isUserExists(
const int userID) 
const;
 
  132        std::vector<int> sortUsers(std::vector<ms_user*> & vecUsers, 
const USERID_SORTBY sortby) 
const;
 
  135        std::vector<int> getAllUserIDs(
const USERID_SORTBY sortby = USERID_SORTBY_ID) 
const;
 
  138        bool deleteUser(
const std::string sessionID, 
const std::string userName);
 
  141        bool updateUser(
const std::string sessionID, 
const ms_user user);
 
  144        bool updatePassword(
const std::string sessionID, 
 
  145                            const std::string userName,
 
  146                            const std::string oldPassword,
 
  147                            const std::string newPassword);
 
  150        std::vector<std::string> getIntegraUsers() 
const;
 
  153        bool addNewGroup(
const std::string sessionID,
 
  155                         const std::string groupName);
 
  158        ms_group getGroup(
const std::string groupName) 
const;
 
  161        ms_group getGroupFromID(
const int groupID) 
const;
 
  164        std::vector<int> getAllGroupIDs() 
const;
 
  167        bool deleteGroup(
const std::string sessionID, 
const std::string groupName);
 
  170        bool updateGroup(
const std::string sessionID, 
const ms_group & group);
 
  176        ms_user::customParams_t getAllCustomParamsForUser(
const ms_user & user) 
const;
 
  185        bool isTaskExists(
const int taskID) 
const;
 
  188        bool createDefaults(
const std::string sessionID = 
"");
 
  191        bool updateAllSessionFiles(
bool deleteOnly = 
false);
 
  202        typedef std::set<ms_user  *, ms_userSortByID>  userlist_t;
 
  203        typedef std::set<ms_group *, ms_groupSortByID> grouplist_t;
 
  205        const char * invalidChars_;
 
  211        int nextFreeGroupID_;
 
  214        void removeAllUsersFromMemory();
 
  215        void removeAllGroupsFromMemory();
 
  216        bool doUpdateUser(
const ms_user user);
 
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
This class will normally only be used by Mascot Security Administration applications.
Definition: ms_security_group.hpp:39
Options for the Mascot security system.
Definition: ms_security_options.hpp:46
Each group has permission to do one or more tasks. This class defines a collection of tasks.
Definition: ms_security_tasks.hpp:51
The main security class to be used by the administration application.
Definition: ms_security.hpp:94
USERID_SORTBY
Sorting criterion to retrieve all users.
Definition: ms_security.hpp:105
This class will normally only be used by Mascot Security Administration applications.
Definition: ms_security_user.hpp:49
usertype
Definitions for types of user.
Definition: ms_security_user.hpp:57