| | |
| | | import com.gitblit.Constants.RegistrantType;
|
| | | import com.gitblit.Constants.Unused;
|
| | | import com.gitblit.utils.ArrayUtils;
|
| | | import com.gitblit.utils.ModelUtils;
|
| | | import com.gitblit.utils.StringUtils;
|
| | |
|
| | | /**
|
| | |
| | | }
|
| | | if (canCreate) {
|
| | | String projectPath = StringUtils.getFirstPathElement(repository);
|
| | | if (!StringUtils.isEmpty(projectPath) && projectPath.equalsIgnoreCase("~" + username)) {
|
| | | if (!StringUtils.isEmpty(projectPath) && projectPath.equalsIgnoreCase(getPersonalPath())) {
|
| | | // personal repository
|
| | | return true;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | public String getPersonalPath() {
|
| | | return "~" + username;
|
| | | return ModelUtils.getPersonalPath(username);
|
| | | }
|
| | |
|
| | | public UserPreferences getPreferences() {
|
| | |
| | |
|
| | | public boolean isMyPersonalRepository(String repository) {
|
| | | String projectPath = StringUtils.getFirstPathElement(repository);
|
| | | return !StringUtils.isEmpty(projectPath) && projectPath.equalsIgnoreCase("~" + username);
|
| | | return !StringUtils.isEmpty(projectPath) && projectPath.equalsIgnoreCase(getPersonalPath());
|
| | | }
|
| | | }
|