Skip to content
Snippets Groups Projects
Commit f57b716d authored by gloas's avatar gloas
Browse files

rel #9979 you can edit role level of a SIGB subscriber -> issue: duplicat user in db

parent a63f5534
Branches
Tags
No related merge requests found
......@@ -55,7 +55,7 @@
if ($this->user->getId() == '1')
echo '<select disabled="disabled"><option selected="selected" value="7">super_admin</option></select><input type="hidden" value="7" name="role" id="role"/>';
else
print $comboListeRole->rendCombo($this->user->getRole(),$this->authUser->ROLE_LEVEL);
print $this->user->getRoleLevel() != 2 ? $comboListeRole->rendCombo($this->user->getRole(),$this->authUser->ROLE_LEVEL) : ZendAfi_Acl_AdminControllerRoles::getLibelleRole(2); ;
?>
</td>
......
......@@ -152,8 +152,6 @@ class ZendAfi_Acl_AdminControllerRoles extends Zend_Acl {
//----------------------------------------------------------------------------------
public static function rendCombo($selected,$user_role_level,$tous=false)
{
if($selected=='abonne_sigb')
return self::getLibelleRole(2);
$html[]='<select name="role">';
if($tous==true)
......
......@@ -91,6 +91,12 @@ class UsersControllerIndexTest extends UsersControllerWithMarcusTestCase {
public function formShouldContainsInputForNom() {
$this->assertXPath('//input[@name="nom"]');
}
/** @test */
public function formShouldContainsRoleSelect() {
$this->assertXPath('//select[@name="role"]');
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment