summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/wicket/pages/ProjectsPage.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-09-29 23:40:46 -0400
committerJames Moger <james.moger@gitblit.com>2012-09-29 23:40:46 -0400
commit1e1b85270f93b3bca624c99b478f3a9a23be2395 (patch)
tree8dfcbd8ca4813d2a42455c62cae3b433d8c0c28a /src/com/gitblit/wicket/pages/ProjectsPage.java
parent0d531b187e123dea5e83b5b7d4749478f26254c1 (diff)
downloadgitblit-1e1b85270f93b3bca624c99b478f3a9a23be2395.tar.gz
gitblit-1e1b85270f93b3bca624c99b478f3a9a23be2395.zip
Preliminary implementation of server-side forking (issue 137)
The fork mechanism clones the repository , access restrictions, and other config options. The app has been updated throughout to handle personal repositories and to properly display origin/fork links. In order to fork a repository the user account must have the #fork role, the origin repository must permit forking, and the user account must have standard clone permissions to the repository. Because forking introduces a new user role no existing user accounts can automatically begin forking a repository. This is both a pro and a con. Since the fork has the same access restrictions as the origin repository, those who can access the origin may also access the fork. This is intentional to facilitate integration-manager workflow. The fork owner does have the power to completely change the access restrictions of his/her fork.
Diffstat (limited to 'src/com/gitblit/wicket/pages/ProjectsPage.java')
-rw-r--r--src/com/gitblit/wicket/pages/ProjectsPage.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/gitblit/wicket/pages/ProjectsPage.java b/src/com/gitblit/wicket/pages/ProjectsPage.java
index f3c4416e..7161d0f3 100644
--- a/src/com/gitblit/wicket/pages/ProjectsPage.java
+++ b/src/com/gitblit/wicket/pages/ProjectsPage.java
@@ -36,6 +36,7 @@ import org.eclipse.jgit.lib.Constants;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.models.ProjectModel;
+import com.gitblit.models.UserModel;
import com.gitblit.utils.MarkdownUtils;
import com.gitblit.utils.StringUtils;
import com.gitblit.wicket.GitBlitWebSession;
@@ -63,6 +64,13 @@ public class ProjectsPage extends RootPage {
protected boolean reusePageParameters() {
return true;
}
+
+ @Override
+ protected List<ProjectModel> getProjectModels() {
+ final UserModel user = GitBlitWebSession.get().getUser();
+ List<ProjectModel> projects = GitBlit.self().getProjectModels(user, false);
+ return projects;
+ }
private void setup(PageParameters params) {
setupPage("", "");