diff options
Diffstat (limited to 'src/main/java/com/gitblit/models/RepositoryModel.java')
-rw-r--r-- | src/main/java/com/gitblit/models/RepositoryModel.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/gitblit/models/RepositoryModel.java b/src/main/java/com/gitblit/models/RepositoryModel.java index 29962658..e28c9df3 100644 --- a/src/main/java/com/gitblit/models/RepositoryModel.java +++ b/src/main/java/com/gitblit/models/RepositoryModel.java @@ -28,6 +28,7 @@ import com.gitblit.Constants.AccessRestrictionType; import com.gitblit.Constants.AuthorizationControl;
import com.gitblit.Constants.FederationStrategy;
import com.gitblit.utils.ArrayUtils;
+import com.gitblit.utils.ModelUtils;
import com.gitblit.utils.StringUtils;
/**
@@ -177,11 +178,11 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel }
public boolean isPersonalRepository() {
- return !StringUtils.isEmpty(projectPath) && projectPath.charAt(0) == '~';
+ return !StringUtils.isEmpty(projectPath) && ModelUtils.isPersonalRepository(projectPath);
}
public boolean isUsersPersonalRepository(String username) {
- return !StringUtils.isEmpty(projectPath) && projectPath.equalsIgnoreCase("~" + username);
+ return !StringUtils.isEmpty(projectPath) && ModelUtils.isUsersPersonalRepository(username, projectPath);
}
public boolean allowAnonymousView() {
|