| | |
| | |
|
| | | import com.gitblit.Constants;
|
| | | import com.gitblit.Constants.AccessRestrictionType;
|
| | | import com.gitblit.Constants.FederationStrategy;
|
| | | import com.gitblit.GitBlit;
|
| | | import com.gitblit.Keys;
|
| | | import com.gitblit.models.UserModel;
|
| | |
| | | }
|
| | | return map;
|
| | | }
|
| | | |
| | | protected Map<FederationStrategy, String> getFederationTypes() {
|
| | | Map<FederationStrategy, String> map = new LinkedHashMap<FederationStrategy, String>();
|
| | | for (FederationStrategy type : FederationStrategy.values()) {
|
| | | switch (type) {
|
| | | case EXCLUDE:
|
| | | map.put(type, getString("gb.excludeFromFederation"));
|
| | | break;
|
| | | case FEDERATE_THIS:
|
| | | map.put(type, getString("gb.federateThis"));
|
| | | break;
|
| | | case FEDERATE_ORIGIN:
|
| | | map.put(type, getString("gb.federateOrigin"));
|
| | | break;
|
| | | }
|
| | | }
|
| | | return map;
|
| | | }
|
| | |
|
| | | protected TimeZone getTimeZone() {
|
| | | return GitBlit.getBoolean(Keys.web.useClientTimezone, false) ? GitBlitWebSession.get()
|
| | |
| | | * Panel fragment for displaying login or logout/change_password links.
|
| | | *
|
| | | */
|
| | | class UserFragment extends Fragment {
|
| | | static class UserFragment extends Fragment {
|
| | |
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | |
| | | add(new Label("username", GitBlitWebSession.get().getUser().toString() + ":"));
|
| | | add(new LinkPanel("loginLink", null, markupProvider.getString("gb.logout"),
|
| | | LogoutPage.class));
|
| | | // quick and dirty hack for showing a separator |
| | | // quick and dirty hack for showing a separator
|
| | | add(new Label("separator", "|"));
|
| | | add(new BookmarkablePageLink<Void>("changePasswordLink", ChangePasswordPage.class));
|
| | | } else {
|