]> source.dussan.org Git - gitblit.git/commitdiff
Renamed method to UserModel.canCreate(String repository)
authorJames Moger <james.moger@gitblit.com>
Mon, 22 Oct 2012 20:07:14 +0000 (16:07 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 22 Oct 2012 20:07:14 +0000 (16:07 -0400)
src/com/gitblit/GitFilter.java
src/com/gitblit/models/UserModel.java

index 8ff93b4efb602350f6605828b7a548e0a4a921df..6afdb01419f9917a5e29a3901feb020bf115fd8c 100644 (file)
@@ -195,7 +195,7 @@ public class GitFilter extends AccessRestrictionFilter {
        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
index 7995f7e4a3373396c50571dc2315a70edd484781..773370435e153768e5b612b8972af3a08213d5b0 100644 (file)
@@ -366,13 +366,12 @@ public class UserModel implements Principal, Serializable, Comparable<UserModel>
        }\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