| | |
| | | package com.gitblit.wicket;
|
| | |
|
| | | import java.util.LinkedHashMap;
|
| | | import java.util.Map;
|
| | | import java.util.TimeZone;
|
| | |
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
| | | import org.slf4j.LoggerFactory;
|
| | |
|
| | | import com.gitblit.Constants;
|
| | | import com.gitblit.Constants.AccessRestrictionType;
|
| | | import com.gitblit.GitBlit;
|
| | | import com.gitblit.Keys;
|
| | | import com.gitblit.wicket.pages.SummaryPage;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | protected Map<AccessRestrictionType, String> getAccessRestrictions() {
|
| | | Map<AccessRestrictionType, String> map = new LinkedHashMap<AccessRestrictionType, String>();
|
| | | for (AccessRestrictionType type : AccessRestrictionType.values()) {
|
| | | switch (type) {
|
| | | case NONE:
|
| | | map.put(type, getString("gb.notRestricted"));
|
| | | break;
|
| | | case PUSH:
|
| | | map.put(type, getString("gb.pushRestricted"));
|
| | | break;
|
| | | case CLONE:
|
| | | map.put(type, getString("gb.cloneRestricted"));
|
| | | break;
|
| | | case VIEW:
|
| | | map.put(type, getString("gb.viewRestricted"));
|
| | | break;
|
| | | }
|
| | | }
|
| | | return map;
|
| | | }
|
| | |
|
| | | protected TimeZone getTimeZone() {
|
| | | return GitBlit.self().settings().getBoolean(Keys.web.useClientTimezone, false) ? GitBlitWebSession.get().getTimezone() : TimeZone.getDefault();
|
| | | }
|