protected RepositoryModel createRepository(UserModel user, String repository, String action) {\r
boolean isPush = !StringUtils.isEmpty(action) && gitReceivePack.equals(action);\r
if (isPush) {\r
- if (user.canCreateOnPush(repository)) {\r
+ if (user.canCreate(repository)) {\r
// user is pushing to a new repository\r
// validate name\r
if (repository.startsWith("../")) {\r
}\r
\r
/**\r
- * Returns true if the user is allowed to create the specified repository\r
- * on-push if the repository does not already exist.\r
+ * Returns true if the user is allowed to create the specified repository.\r
* \r
* @param repository\r
* @return true if the user can create the repository\r
*/\r
- public boolean canCreateOnPush(String repository) {\r
+ public boolean canCreate(String repository) {\r
if (canAdmin()) {\r
// admins can create any repository\r
return true;\r