diff --git a/GameEngine/Alliance.php b/GameEngine/Alliance.php index cd652bd1..9cba0f17 100755 --- a/GameEngine/Alliance.php +++ b/GameEngine/Alliance.php @@ -452,8 +452,9 @@ class Alliance { } if($this->userPermArray['opt1'] == 0) $form->addError("perm", NO_PERMISSION); - elseif($database->getUserField($post['a_user'], "alliance", 0) != $session->alliance) $form->addError("perm", USER_NOT_IN_YOUR_ALLY); + elseif($database->getUserField($post['a_user'], "alliance", 0) != $session->alliance) $form->addError("perm", USER_NOT_IN_YOUR_ALLY); elseif($post['a_user'] == $session->uid) $form->addError("perm", CANT_EDIT_YOUR_PERMISSIONS); + elseif($database->isAllianceOwner($_POST['a_user'])) $form->addError("perm", CANT_EDIT_LEADER_PERMISSIONS); else { $database->updateAlliPermissions($post['a_user'], $session->alliance, $post['a_titel'], $post['e1'], $post['e2'], $post['e3'], $post['e4'], $post['e5'], $post['e6'], $post['e7']); diff --git a/GameEngine/Lang/en.php b/GameEngine/Lang/en.php index a4b9c5a1..47aeeba9 100755 --- a/GameEngine/Lang/en.php +++ b/GameEngine/Lang/en.php @@ -75,6 +75,7 @@ define("ALREADY_ALLY_MEMBER","You're already in an alliance"); define("ALLY_TOO_LOW", "You must have a level 3 or greater embassy"); define("USER_NOT_IN_YOUR_ALLY","This user is not in your alliance!"); define("CANT_EDIT_YOUR_PERMISSIONS","You can't edit your own permissions!"); +define("CANT_EDIT_LEADER_PERMISSIONS","Alliance leader's permissions can't be edited!"); define("NO_PERMISSION", "You don't have enough permissions!"); define("NAME_OR_DIPL_EMPTY", "Name or diplomacy empty"); define("ALLY_DOESNT_EXISTS","Alliance does not exist"); diff --git a/Templates/Alliance/assignpos.tpl b/Templates/Alliance/assignpos.tpl index 7cfb567a..1b7e9821 100644 --- a/Templates/Alliance/assignpos.tpl +++ b/Templates/Alliance/assignpos.tpl @@ -24,10 +24,8 @@ if($session->access!=BANNED){