Skip to content

Commit 5e4ad91

Browse files
authored
Fix profiles rights uniqueness
1 parent d30d7ef commit 5e4ad91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Profile.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
use Glpi\Helpdesk\Tile\LinkableToTilesInterface;
4343
use Glpi\Helpdesk\Tile\TilesManager;
4444
use Glpi\RichText\UserMention;
45-
use Glpi\Search\SearchOption;
4645
use Glpi\Toolbox\ArrayNormalizer;
4746

4847
/**
@@ -3747,10 +3746,11 @@ public function rawSearchOptions()
37473746
];
37483747

37493748
// Add custom asset definition rights
3749+
$custom_assets_right_offset = 1000;
37503750
foreach (AssetDefinitionManager::getInstance()->getDefinitions(true) as $definition) {
37513751
$asset = $definition->getAssetClassName();
37523752
$tab[] = [
3753-
'id' => SearchOption::generateAProbablyUniqueId($asset),
3753+
'id' => $custom_assets_right_offset + $definition->getID(),
37543754
'table' => 'glpi_profilerights',
37553755
'field' => 'rights',
37563756
'name' => $asset::getTypeName(1),

0 commit comments

Comments
 (0)