Commit 60281918 authored by Till Brehm's avatar Till Brehm

Ensure that manually added CP users of type admin can not be changed to type user.

parent 69deac7a
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'A senhas coincidem.';
$wb['username_error_collision'] = 'O nome do usuário não pode conter as palavras reservadas -web- ou -web- seguidas por um número.';
$wb['client_not_admin_err'] = 'Um usuário definido como cliente não pode ser configurado com o tipo: admin (administrador).';
$wb['lost_password_function_txt'] = 'Função reconfigurar senha perdida disponível';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Hesla se shodují.';
$wb['username_error_collision'] = 'Uživatelské jméno nesmí být web nebo web a číslo.';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Die Passwörter stimmen überein.';
$wb['username_error_collision'] = 'Der Benutzername darf nicht <b>web<b> oder <b>web<b> gefolgt von einer Zahl sein.';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Passwort vergessen Funktion steht zur Verfügung';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Adgangskoderne stemmer overens.';
$wb['username_error_collision'] = 'Brugernavn må ikke være web eller web plus et tal.\\"';
$wb['client_not_admin_err'] = 'En bruger der hører til en klient kan ikke indstilles til typen: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number."';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['username_error_collision'] = 'El nombre de usuario no puede ser el del web
$wb['username_txt'] = 'Nombre de usuario';
$wb['username_unique'] = 'Ya existe un usuario con ese nombre de usuario.';
$wb['vorname_txt'] = 'Primer nombre';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Les mots de passe correspondent.';
$wb['username_error_collision'] = 'Le nom d\'utilisateur ne peut pas commencer par <b>web</b> ou <b>web</b> suivi d\'un nombre.';
$wb['client_not_admin_err'] = 'Un utilisateur affilié à un client ne peut pas être changé en type admin';
$wb['lost_password_function_txt'] = 'La fonction mot de passe oublié est disponible';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Šifre su identične.';
$wb['username_error_collision'] = 'Korisničko ime ne može biti web ili web sa brojem.\\"';
$wb['client_not_admin_err'] = 'Korisnik koji je u grupi klijenti ne može biti admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Le password coincidono.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Hasła pasują';
$wb['username_error_collision'] = 'Nazwa użytkownika nie może być web lub web z numerem.';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Эти пароли совпадают.';
$wb['username_error_collision'] = 'Имя пользователя не может начинаться со слова "web" или "web" плюс число.';
$wb['client_not_admin_err'] = 'Пользователь, который принадлежит к клиенту не может быть установлен тип: admin';
$wb['lost_password_function_txt'] = 'Функция восстановления пароля доступна';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Lösenorden matchar';
$wb['username_error_collision'] = 'Användarnamnet får inte vara web eller web och ett nummer';
$wb['client_not_admin_err'] = 'En användare som tillhör en kund kan inte sättas som admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'The passwords do match.';
$wb['username_error_collision'] = 'The username may not be web or web plus a number.\\"';
$wb['client_not_admin_err'] = 'A user that belongs to a client can not be set to type: admin';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -32,5 +32,5 @@ $wb['password_match_txt'] = 'Parola ile onayı aynı.';
$wb['username_error_collision'] = 'Kullanıcı adı -web- ya da -web- sözcüğünü izleyen bir sayı ile başlayamaz.\\"';
$wb['client_not_admin_err'] = 'Bir müşteriye ait bir kullanıcının tipi admin olarak atanamaz';
$wb['lost_password_function_txt'] = 'Forgot password function is available';
$wb['no_user_insert'] = 'CP-Users of type -user- get added automatically when you add a client or reseller.';
$wb['no_user_insert'] = 'CP-Users of type -user- get added and updated automatically when you add a client or reseller.';
?>
......@@ -90,6 +90,11 @@ class page_action extends tform_actions {
$app->tform->errorMessage .= $app->tform->wordbook['client_not_admin_err'];
}
//* Users have to belong to clients
if(isset($this->dataRecord['typ']) && $this->dataRecord['typ'][0] == 'user' && $this->oldDataRecord['client_id'] == 0) {
$app->tform->errorMessage .= $app->tform->wordbook['no_user_insert'];
}
}
/*
......
Markdown is supported
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