ITSM-NG uses a sophisticated profile-based permissions system that controls what users can see and do. Profiles define roles with specific rights across different modules and features.
What actions they can perform (read, create, update, delete)
Which interface they use (Standard or Helpdesk)
// From inc/profile.class.php:40-80class Profile extends CommonDBTM { // Common fields for all profiles public static $common_fields = [ 'id', // Profile identifier 'interface', // 'central' or 'helpdesk' 'is_default', // Default profile for new users 'name' // Profile name ];}
// Check if user has specific rightSession::haveRight('computer', CREATE); // Can create computers?Session::haveRight('ticket', UPDATE); // Can update tickets?// Check multiple rightsSession::haveRightsOr('entity', [UPDATE, CREATE]); // Has either right?Session::haveRightsAnd('ticket', [READ, UPDATE]); // Has both rights?
// From inc/profile.class.php:703-763'name' // Profile name'interface' // 'central' or 'helpdesk''is_default' // Default profile for new users'password_update' // Can update own password'create_ticket_on_login' // Show ticket form on login'comment' // Profile description
// From inc/profile.class.php:775-865'helpdesk_hardware' // Link hardware (bitwise flags)'helpdesk_item_type' // Allowed item types (serialized array)'show_group_hardware' // See group members' hardware
Helpdesk Hardware Flags:
// What hardware can be linked to tickets1 // Own items2 // Group items4 // All items
// From inc/profile.class.php:316-363'ticket_status' // Allowed status transitions (serialized)'problem_status' // Problem status transitions'change_status' // Change status transitions
Example:
// Define allowed transitions$cycle = [ Ticket::INCOMING => [ Ticket::ASSIGNED => 1, // Can assign incoming tickets Ticket::PLANNED => 1, // Can plan incoming tickets ], Ticket::ASSIGNED => [ Ticket::PLANNED => 1, // Can plan assigned tickets Ticket::SOLVED => 1, // Can solve assigned tickets ]];
Rights are NOT hierarchical - each profile is independent:
Super-Admin Profile: Full rights (31 on all modules)Technician Profile: Limited rights (7 on tickets, 1 on assets)End-User Profile: Minimal rights (5 on tickets only)
// From inc/profile.class.php:557-611// Profiles can only be assigned to users with EQUAL or LESSER rightspublic static function currentUserHaveMoreRightThan($profile_ids) { // Compares all rights between current user and target profiles // Returns true only if current user has >= rights on ALL modules}
// From inc/profile.class.php:212-222'is_default' = 1 // Automatically assigned to new users// Only ONE profile can be default// Setting a new default removes flag from others
// From inc/profile.class.php:401-446// Cannot delete last profile with UPDATE rights on profiles// Prevents locking yourself out of profile managementpublic function pre_deleteItem() { if (last_profile_with_rights('profile', UPDATE)) { return false; // Deletion refused }}
// From inc/profile.class.php:490-503public function cleanProfile() { if ($this->fields['interface'] == 'helpdesk') { // Remove non-helpdesk rights // Keep only $helpdesk_rights fields }}