| | |
| | |
|
| | | import com.gitblit.Constants.AccessPermission;
|
| | | import com.gitblit.Constants.AccountType;
|
| | | import com.gitblit.Constants.Transport;
|
| | | import com.gitblit.manager.IRuntimeManager;
|
| | | import com.gitblit.models.TeamModel;
|
| | | import com.gitblit.models.UserModel;
|
| | |
| | | private static final String STARRED = "starred";
|
| | |
|
| | | private static final String LOCALE = "locale";
|
| | |
|
| | | private static final String EMAILONMYTICKETCHANGES = "emailMeOnMyTicketChanges";
|
| | |
|
| | | private static final String TRANSPORT = "transport";
|
| | |
|
| | | private static final String ACCOUNTTYPE = "accountType";
|
| | |
|
| | |
| | | String val = model.getPreferences().getLocale().getLanguage() + "_" + model.getPreferences().getLocale().getCountry();
|
| | | config.setString(USER, model.username, LOCALE, val);
|
| | | }
|
| | |
|
| | | config.setBoolean(USER, model.username, EMAILONMYTICKETCHANGES, model.getPreferences().isEmailMeOnMyTicketChanges());
|
| | |
|
| | | if (model.getPreferences().getTransport() != null) {
|
| | | config.setString(USER, model.username, TRANSPORT, model.getPreferences().getTransport().name());
|
| | | }
|
| | | }
|
| | |
|
| | | // user roles
|
| | |
| | |
|
| | | // preferences
|
| | | user.getPreferences().setLocale(config.getString(USER, username, LOCALE));
|
| | | user.getPreferences().setEmailMeOnMyTicketChanges(config.getBoolean(USER, username, EMAILONMYTICKETCHANGES, true));
|
| | | user.getPreferences().setTransport(Transport.fromString(config.getString(USER, username, TRANSPORT)));
|
| | |
|
| | | // user roles
|
| | | Set<String> roles = new HashSet<String>(Arrays.asList(config.getStringList(
|