Replace "Login name" for "Username"

FEA: ItEr76S27ResourceBinding
This commit is contained in:
Manuel Rego Casasnovas 2012-05-09 13:36:48 +02:00
parent cc92ce809d
commit da64d3bd26
18 changed files with 34 additions and 32 deletions

View file

@ -40,8 +40,8 @@ Authentication
============== ==============
Here can be configured the property in LDAP nodes where should be found the Here can be configured the property in LDAP nodes where should be found the
given login name. The property *UserId* must be filled with the name of the given username. The property *UserId* must be filled with the name of the
property where the login name is stored in LDAP. property where the username is stored in LDAP.
The checkbox *Save passwords in database* when it is checked, means that the The checkbox *Save passwords in database* when it is checked, means that the
password is stored also in LibrePlan database. In this way, if LDAP is offline password is stored also in LibrePlan database. In this way, if LDAP is offline

View file

@ -39,34 +39,36 @@ import org.libreplan.business.users.entities.User;
public interface IUserDAO extends IGenericDAO<User, Long>{ public interface IUserDAO extends IGenericDAO<User, Long>{
/** /**
* NOTE: Login name comparison is case-insensitive. * NOTE: Username comparison is case-insensitive.
*/ */
public User findByLoginName(String loginName) public User findByLoginName(String loginName)
throws InstanceNotFoundException; throws InstanceNotFoundException;
/** /**
* NOTE: Login name comparison is case-insensitive, and the method is * NOTE: Username comparison is case-insensitive, and the method is executed
* executed in another transaction. * in another transaction.
*/ */
public User findByLoginNameAnotherTransaction(String loginName) public User findByLoginNameAnotherTransaction(String loginName)
throws InstanceNotFoundException; throws InstanceNotFoundException;
/** /**
* NOTE: Login name comparison is case-insensitive. * NOTE: Username comparison is case-insensitive.
*/ */
public boolean existsByLoginName(String loginName); public boolean existsByLoginName(String loginName);
/** /**
* NOTE: Login name comparison is case-insensitive, and the method is * NOTE: Username comparison is case-insensitive, and the method is executed
* executed in another transaction. * in another transaction.
*/ */
public boolean existsByLoginNameAnotherTransaction(String loginName); public boolean existsByLoginNameAnotherTransaction(String loginName);
/** /**
* Finds a User entity by its loginName, among those with the disabled * Finds a User entity by its loginName, among those with the disabled
* attribute set to false. * attribute set to false.
* @param loginName loginName to perform the search. NOTE: Login name *
* comparison is case-insensitive. * @param loginName
* loginName to perform the search. NOTE: Username comparison is
* case-insensitive.
* @return a {@link User} object. * @return a {@link User} object.
* @throws InstanceNotFoundException * @throws InstanceNotFoundException
*/ */

View file

@ -110,7 +110,7 @@ public class User extends BaseEntity implements IHumanIdentifiable{
return create(new User(loginName, password, email)); return create(new User(loginName, password, email));
} }
@NotEmpty(message = "login name not specified") @NotEmpty(message = "username not specified")
public String getLoginName() { public String getLoginName() {
return loginName; return loginName;
} }
@ -208,7 +208,7 @@ public class User extends BaseEntity implements IHumanIdentifiable{
return isInRole(UserRole.ROLE_ADMINISTRATION); return isInRole(UserRole.ROLE_ADMINISTRATION);
} }
@AssertTrue(message = "login name is already being used by another user") @AssertTrue(message = "username is already being used by another user")
public boolean checkConstraintUniqueLoginName() { public boolean checkConstraintUniqueLoginName() {
IUserDAO userDAO = Registry.getUserDAO(); IUserDAO userDAO = Registry.getUserDAO();

View file

@ -44,7 +44,7 @@ public class UserBandboxFinder extends BandboxFinder implements IBandboxFinder {
@Autowired @Autowired
private IUserDAO userDAO; private IUserDAO userDAO;
private final String headers[] = { _("Login name"), _("Full name") }; private final String headers[] = { _("Username"), _("Full name") };
/** /**
* Forces to mark the string as needing translation * Forces to mark the string as needing translation

View file

@ -34,7 +34,7 @@ import org.libreplan.business.common.exceptions.InstanceNotFoundException;
import org.libreplan.business.users.entities.UserRole; import org.libreplan.business.users.entities.UserRole;
/** /**
* It enumerates the mandatory users (login names) for running the application.<br /> * It enumerates the mandatory users (usernames) for running the application.<br />
* *
* <code>ADMIN</code> user will be always enabled, however <code>USER</code>, * <code>ADMIN</code> user will be always enabled, however <code>USER</code>,
* <code>WSREADER</code> and <code>WSWRITER</code> could be disabled in * <code>WSREADER</code> and <code>WSWRITER</code> could be disabled in

View file

@ -63,8 +63,8 @@ public class DBUserDetailsService implements UserDetailsService {
try { try {
user = userDAO.findByLoginName(loginName); user = userDAO.findByLoginName(loginName);
} catch (InstanceNotFoundException e) { } catch (InstanceNotFoundException e) {
throw new UsernameNotFoundException(_("User with login name " + throw new UsernameNotFoundException(_(
"'{0}': not found", loginName)); "User with username '{0}': not found", loginName));
} }
Scenario scenario = user.getLastConnectedScenario(); Scenario scenario = user.getLastConnectedScenario();

View file

@ -36,7 +36,7 @@ public interface IDBPasswordEncoderService {
/** /**
* Encodes a clear password. The second parameter (which must be the * Encodes a clear password. The second parameter (which must be the
* login name) may be used as a salt. * username) may be used as a salt.
*/ */
public String encodePassword(String clearPassword, String loginName); public String encodePassword(String clearPassword, String loginName);

View file

@ -62,7 +62,7 @@ public class LDAPUserDetailsService implements UserDetailsService {
try { try {
user = userDAO.findByLoginName(loginName); user = userDAO.findByLoginName(loginName);
} catch (InstanceNotFoundException e) { } catch (InstanceNotFoundException e) {
throw new UsernameNotFoundException(_("User with login name " throw new UsernameNotFoundException(_("User with username "
+ "'{0}': not found", loginName)); + "'{0}': not found", loginName));
} }

View file

@ -137,7 +137,7 @@
</columns> </columns>
<rows> <rows>
<row> <row>
<label value="${i18n:_('Login name')}" /> <label value="${i18n:_('Username')}" />
<textbox id="loginName" width="300px" /> <textbox id="loginName" width="300px" />
</row> </row>
<row> <row>

View file

@ -44,7 +44,7 @@
</columns> </columns>
<rows> <rows>
<row> <row>
<label value="${i18n:_('Login name')}" /> <label value="${i18n:_('Username')}" />
<textbox id="loginName" <textbox id="loginName"
value="@{controller.user.loginName}" width="300px" value="@{controller.user.loginName}" width="300px"
constraint="no empty:${i18n:_('cannot be null or empty')}" constraint="no empty:${i18n:_('cannot be null or empty')}"

View file

@ -24,7 +24,7 @@
pageSize="10" sclass="clickable-rows" pageSize="10" sclass="clickable-rows"
rowRenderer="@{controller.usersRenderer}"> rowRenderer="@{controller.usersRenderer}">
<columns sizable="true"> <columns sizable="true">
<newdatasortablecolumn label="${i18n:_('User login name')}" sort="auto(loginName)" /> <newdatasortablecolumn label="${i18n:_('Username')}" sort="auto(loginName)" />
<newdatasortablecolumn label="${i18n:_('Disabled')}" /> <newdatasortablecolumn label="${i18n:_('Disabled')}" />
<newdatasortablecolumn label="${i18n:_('Administrator')}" /> <newdatasortablecolumn label="${i18n:_('Administrator')}" />
<newdatasortablecolumn label="${i18n:_('Authentication type')}" /> <newdatasortablecolumn label="${i18n:_('Authentication type')}" />

View file

@ -75,7 +75,7 @@ function commonUserCreate($name, $password) {
} }
function commonUserForm($name, $password) { function commonUserForm($name, $password) {
_setValue(_textbox(0, _near(_span("Login name"))), $name); _setValue(_textbox(0, _near(_span("Username"))), $name);
_setValue(_password(0, _near(_span("Password"))), $password); _setValue(_password(0, _near(_span("Password"))), $password);
_setValue(_password(0, _near(_span("Password confirmation"))), $password); _setValue(_password(0, _near(_span("Password confirmation"))), $password);
_click(_cell("Save")); _click(_cell("Save"));

View file

@ -71,7 +71,7 @@ function profileAssign($account, $password, $profile){
} }
function accountsForm($name, $password, $profile) { function accountsForm($name, $password, $profile) {
_setValue(_textbox(0, _near(_span("Login name"))), $name); _setValue(_textbox(0, _near(_span("Username"))), $name);
_setValue(_password(0, _near(_span("Password"))), $password); _setValue(_password(0, _near(_span("Password"))), $password);
_setValue(_password(0, _near(_span("Password confirmation"))), $password); _setValue(_password(0, _near(_span("Password confirmation"))), $password);
_click(_textbox(0, _near(_cell("Add role")))); _click(_textbox(0, _near(_cell("Add role"))));

View file

@ -76,7 +76,7 @@ function accountsCreateTwoUserSamePass($name, $password) {
function accountsCreateTwoPass($name, $password, $newPassword){ function accountsCreateTwoPass($name, $password, $newPassword){
commonCreate("Accounts"); commonCreate("Accounts");
_setValue(_textbox(0, _near(_span("Login name"))), $name); _setValue(_textbox(0, _near(_span("Username"))), $name);
_setValue(_password(0, _near(_span("Password"))), $password); _setValue(_password(0, _near(_span("Password"))), $password);
_setValue(_password(0, _near(_span("Password confirmation"))), $newPassword); _setValue(_password(0, _near(_span("Password confirmation"))), $newPassword);
_click(_cell("Save")); _click(_cell("Save"));
@ -86,7 +86,7 @@ function accountsCreateTwoPass($name, $password, $newPassword){
} }
function accountsForm($name, $password) { function accountsForm($name, $password) {
_setValue(_textbox(0, _near(_span("Login name"))), $name); _setValue(_textbox(0, _near(_span("Username"))), $name);
_setValue(_password(0, _near(_span("Password"))), $password); _setValue(_password(0, _near(_span("Password"))), $password);
_setValue(_password(0, _near(_span("Password confirmation"))), $password); _setValue(_password(0, _near(_span("Password confirmation"))), $password);
_click(_cell("Save")); _click(_cell("Save"));
@ -94,8 +94,8 @@ function accountsForm($name, $password) {
/* test to check a that LibrePlan give us a error */ /* test to check a that LibrePlan give us a error */
function accountsNotValid(){ function accountsNotValid(){
_assertExists(_span("checkConstraintUniqueLoginName: login name is already being used by another user")); _assertExists(_span("checkConstraintUniqueLoginName: username is already being used by another user"));
_assert(_isVisible(_span("checkConstraintUniqueLoginName: login name is already being used by another user"))); _assert(_isVisible(_span("checkConstraintUniqueLoginName: username is already being used by another user")));
} }
function accountsComprobateUser($name, $Password) { function accountsComprobateUser($name, $Password) {
@ -106,7 +106,7 @@ function accountsComprobateUser($name, $Password) {
function accountsEdit($oldName, $newName, $newPassword, $cell) { function accountsEdit($oldName, $newName, $newPassword, $cell) {
_click(_link("Accounts")); _click(_link("Accounts"));
commonEdit($oldName, $cell); commonEdit($oldName, $cell);
_setValue(_textbox(0, _near(_span("Login name"))), $newName); _setValue(_textbox(0, _near(_span("Username"))), $newName);
_setValue(_password(0, _near(_span("Password"))), $newPassword); _setValue(_password(0, _near(_span("Password"))), $newPassword);
_setValue(_password(0, _near(_span("Password confirmation"))), $newPassword); _setValue(_password(0, _near(_span("Password confirmation"))), $newPassword);
_click(_textbox(0, _near(_cell("Add role")))); _click(_textbox(0, _near(_cell("Add role"))));

View file

@ -2,7 +2,7 @@
. ./rest-common-env.sh . ./rest-common-env.sh
printf "Login name: " printf "Username: "
read loginName read loginName
printf "Password: " printf "Password: "
read password read password

View file

@ -2,7 +2,7 @@
. ./rest-common-env.sh . ./rest-common-env.sh
printf "Login name: " printf "Username: "
read loginName read loginName
printf "Password: " printf "Password: "
read password read password

View file

@ -2,7 +2,7 @@
. ./rest-common-env.sh . ./rest-common-env.sh
printf "Login name: " printf "Username: "
read loginName read loginName
printf "Password: " printf "Password: "
read password read password

View file

@ -2,7 +2,7 @@
. ./rest-common-env.sh . ./rest-common-env.sh
printf "Login name: " printf "Username: "
read loginName read loginName
printf "Password: " printf "Password: "
read password read password