Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > 0337e1cb0d238c38a78a4f8d55c2be42 > files > 2

glpi-0.84.8-2.1.mga5.src.rpm

Index: branches/0.84-bugfixes/inc/user.class.php
===================================================================
--- branches/0.84-bugfixes/inc/user.class.php	(révision 23406)
+++ branches/0.84-bugfixes/inc/user.class.php	(révision 23407)
@@ -556,7 +556,9 @@
       // Add default profile
       if (!$rulesplayed) {
          $affectation = array();
-         if (isset($this->input['_profiles_id']) && $this->input['_profiles_id']) {
+         if (isset($this->input['_profiles_id']) && $this->input['_profiles_id']
+            && Profile::currentUserHaveMoreRightThan(array($this->input['_profiles_id']))
+            ) {
             $profile                   = $this->input['_profiles_id'];
             // Choosen in form, so not dynamic
             $affectation['is_dynamic'] = 0;