Changeset 900 for trunk/Modules/User
- Timestamp:
- Feb 17, 2021, 5:15:29 PM (4 years ago)
- Location:
- trunk/Modules/User
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/User/User.php
r899 r900 27 27 function DoInstall(): void 28 28 { 29 $this->Database->insert('PermissionGroup', array('Id' => 1, 'Description' => 'Ostatní')); 30 $this->Database->insert('PermissionGroup', array('Id' => 2, 'Description' => 'Registrovaní uživatelé')); 31 $this->Database->insert('PermissionGroup', array('Id' => 3, 'Description' => 'Zákazníci')); 32 $this->Database->insert('PermissionGroup', array('Id' => 4, 'Description' => 'Správci sítě')); 33 $this->Database->insert('PermissionGroup', array('Id' => 5, 'Description' => 'Systémoví správci')); 29 } 30 31 function DoInsertSampleData(): void 32 { 33 $DbResult = $this->Database->select('User', 'Id', 'Login="admin"'); 34 if ($DbResult->num_rows == 0) 35 { 36 $UserId = $this->Database->insert('User', array('Id' => 1, 'Login' => 'admin', 'Name' => 'Admin', 'Password' => 'd04b7c77a814de3207315c2f82dcd97a90ed33ca', 37 'Salt' => 'd5d8eb61e1a20d98b45b415ccd2fae802cb41294', 'Email' => 'admin@localhost', 'LastIpAddress' => null, 'LastLoginTime' => null, 38 'RegistrationTime' => '2021-02-17 14:56:22', 'Locked' => 0, 'InitPassword' => null)); 39 40 $PermissionGroup1 = $this->Database->insert('PermissionGroup', array('Description' => 'Ostatní')); 41 $PermissionGroup2 = $this->Database->insert('PermissionGroup', array('Description' => 'Registrovaní uživatelé')); 42 $PermissionGroup3 = $this->Database->insert('PermissionGroup', array('Description' => 'Zákazníci')); 43 $PermissionGroup4 = $this->Database->insert('PermissionGroup', array('Description' => 'Správci sítě')); 44 $PermissionGroup5 = $this->Database->insert('PermissionGroup', array('Description' => 'Systémoví správci')); 45 46 $this->Database->insert('PermissionUserAssignment', array('User' => $UserId, 'AssignedGroup' => $PermissionGroup5)); 47 } 34 48 } 35 49 -
trunk/Modules/User/UserModel.php
r899 r900 505 505 { 506 506 $Desc = new ModelDesc(self::GetClassName()); 507 //$Desc->AddReference('Module', Module::GetClassName());507 $Desc->AddReference('Module', Module::GetClassName()); 508 508 $Desc->AddString('Operation'); 509 509 $Desc->AddString('Item');
Note:
See TracChangeset
for help on using the changeset viewer.