| | |
| | | repositoryModel.name = repositoryModel.name.replace("//", "/");
|
| | |
|
| | | // prohibit folder paths
|
| | | if (repositoryModel.name.startsWith("/")) { |
| | | if (repositoryModel.name.startsWith("/")) {
|
| | | error("Leading root folder references (/) are prohibited.");
|
| | | return;
|
| | | }
|
| | | if (repositoryModel.name.startsWith("../")) { |
| | | if (repositoryModel.name.startsWith("../")) {
|
| | | error("Relative folder references (../) are prohibited.");
|
| | | return;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | // confirm access restriction selection
|
| | | if (repositoryModel.accessRestriction == null) {
|
| | | error("Please select access restriction!");
|
| | |
| | | }
|
| | |
|
| | | // save the repository
|
| | | GitBlit.self().editRepositoryModel(oldName, repositoryModel, isCreate);
|
| | | GitBlit.self().updateRepositoryModel(oldName, repositoryModel, isCreate);
|
| | |
|
| | | // save the repository access list
|
| | | if (repositoryModel.accessRestriction.exceeds(AccessRestrictionType.NONE)) {
|