diff options
author | James Moger <james.moger@gitblit.com> | 2014-06-08 10:30:39 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-06-13 08:00:48 -0400 |
commit | 6651a8e96bdc51b0c558b88e1c77fcfbed1837da (patch) | |
tree | b2d89a6dd77868783485af61636c65edf32b1861 /src/main/java/com/gitblit/wicket/pages/RootSubPage.java | |
parent | 2bfea381bbcea934f7e20f8c00db86e990c2fc93 (diff) | |
download | gitblit-ticket/75.tar.gz gitblit-ticket/75.zip |
Move repository ownership to the UserModel and prepare for project ownershipticket/75
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages/RootSubPage.java')
-rw-r--r-- | src/main/java/com/gitblit/wicket/pages/RootSubPage.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/RootSubPage.java b/src/main/java/com/gitblit/wicket/pages/RootSubPage.java index 62d07a7f..53ed198f 100644 --- a/src/main/java/com/gitblit/wicket/pages/RootSubPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RootSubPage.java @@ -89,17 +89,16 @@ public abstract class RootSubPage extends RootPage { RepositoryModel repositoryModel = app().repositories().getRepositoryModel(repo);
if (repositoryModel.accessRestriction.exceeds(AccessRestrictionType.NONE)
&& repositoryModel.authorizationControl.equals(AuthorizationControl.NAMED)) {
- if (user != null &&
- (repositoryModel.isOwner(user.username) || repositoryModel.isUsersPersonalRepository(user.username))) {
+ if (user != null && user.isOwner(repositoryModel)) {
// exclude Owner or personal repositories
continue;
}
if (includeWildcards) {
- if (lastProject == null || !lastProject.equalsIgnoreCase(repositoryModel.projectPath)) {
- lastProject = repositoryModel.projectPath.toLowerCase();
- if (!StringUtils.isEmpty(repositoryModel.projectPath)) {
+ if (lastProject == null || !lastProject.equalsIgnoreCase(repositoryModel.getProject())) {
+ lastProject = repositoryModel.getProject().toLowerCase();
+ if (!StringUtils.isEmpty(repositoryModel.getProject())) {
// regex for all repositories within a project
- repos.add(repositoryModel.projectPath + "/.*");
+ repos.add(repositoryModel.getProjectPath() + "/.*");
}
}
}
|