mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-01 02:56:08 +01:00
Refactor to use ProjectService instead of JGitUtil directly to retrieve project information.
This commit is contained in:
@@ -78,7 +78,7 @@ trait CreateRepositoryControllerBase extends ControllerBase { self: ProjectServi
|
||||
def validate(name: String, value: String): Option[String] = {
|
||||
if(!value.matches("^[a-zA-Z0-9\\-_]+$")){
|
||||
Some("Repository name contains invalid character.")
|
||||
} else if(getRepositories(context.loginUser).contains(value)){
|
||||
} else if(getRepositories(context.loginUser, servletContext).contains(value)){
|
||||
Some("Repository already exists.")
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user