diff options
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages')
10 files changed, 18 insertions, 14 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/ActivityPage.java b/src/main/java/com/gitblit/wicket/pages/ActivityPage.java index 5e7332f5..070caf32 100644 --- a/src/main/java/com/gitblit/wicket/pages/ActivityPage.java +++ b/src/main/java/com/gitblit/wicket/pages/ActivityPage.java @@ -71,8 +71,13 @@ public class ActivityPage extends RootPage { // determine repositories to view and retrieve the activity
List<RepositoryModel> models = getRepositories(params);
- List<Activity> recentActivity = ActivityUtils.getRecentActivity(models,
- daysBack, objectId, getTimeZone());
+ List<Activity> recentActivity = ActivityUtils.getRecentActivity(
+ app().settings(),
+ app().repositories(),
+ models,
+ daysBack,
+ objectId,
+ getTimeZone());
String headerPattern;
if (daysBack == 1) {
diff --git a/src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.java b/src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.java index 3e308f1b..a3c1ece5 100644 --- a/src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.java +++ b/src/main/java/com/gitblit/wicket/pages/ChangePasswordPage.java @@ -97,10 +97,10 @@ public class ChangePasswordPage extends RootSubPage { user.password = password;
try {
- app().users().updateUserModel(user.username, user, false);
+ app().gitblit().updateUserModel(user.username, user, false);
if (app().settings().getBoolean(Keys.web.allowCookieAuthentication, false)) {
WebResponse response = (WebResponse) getRequestCycle().getResponse();
- app().session().setCookie(response, user);
+ app().session().setCookie(response.getHttpServletResponse(), user);
}
} catch (GitBlitException e) {
error(e.getMessage());
diff --git a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java index 76b34f3a..a986fd53 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java @@ -169,7 +169,7 @@ public class EditRepositoryPage extends RootSubPage { final RegistrantPermissionsPanel usersPalette = new RegistrantPermissionsPanel("users",
RegistrantType.USER, app().users().getAllUsernames(), repositoryUsers, getAccessPermissions());
final RegistrantPermissionsPanel teamsPalette = new RegistrantPermissionsPanel("teams",
- RegistrantType.TEAM, app().users().getAllTeamnames(), repositoryTeams, getAccessPermissions());
+ RegistrantType.TEAM, app().users().getAllTeamNames(), repositoryTeams, getAccessPermissions());
// owners palette
List<String> owners = new ArrayList<String>(repositoryModel.owners);
diff --git a/src/main/java/com/gitblit/wicket/pages/EditTeamPage.java b/src/main/java/com/gitblit/wicket/pages/EditTeamPage.java index 32905c95..4f548d46 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditTeamPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditTeamPage.java @@ -196,7 +196,7 @@ public class EditTeamPage extends RootSubPage { teamModel.postReceiveScripts.addAll(postReceiveScripts);
try {
- app().users().updateTeamModel(oldName, teamModel, isCreate);
+ app().gitblit().updateTeamModel(oldName, teamModel, isCreate);
} catch (GitBlitException e) {
error(e.getMessage());
return;
diff --git a/src/main/java/com/gitblit/wicket/pages/EditUserPage.java b/src/main/java/com/gitblit/wicket/pages/EditUserPage.java index d0e52f46..b2d3d3b1 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditUserPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditUserPage.java @@ -110,7 +110,7 @@ public class EditUserPage extends RootSubPage { final Palette<String> teams = new Palette<String>("teams", new ListModel<String>(
new ArrayList<String>(userTeams)), new CollectionModel<String>(app().users()
- .getAllTeamnames()), new StringChoiceRenderer(), 10, false);
+ .getAllTeamNames()), new StringChoiceRenderer(), 10, false);
Form<UserModel> form = new Form<UserModel>("editForm", model) {
private static final long serialVersionUID = 1L;
@@ -192,7 +192,7 @@ public class EditUserPage extends RootSubPage { }
try {
- app().users().updateUserModel(oldName, userModel, isCreate);
+ app().gitblit().updateUserModel(oldName, userModel, isCreate);
} catch (GitBlitException e) {
error(e.getMessage());
return;
diff --git a/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.java index 9e4d355c..06eb72aa 100644 --- a/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EmptyRepositoryPage.java @@ -58,7 +58,7 @@ public class EmptyRepositoryPage extends RootPage { }
HttpServletRequest req = ((WebRequest) getRequest()).getHttpServletRequest();
- List<RepositoryUrl> repositoryUrls = app().repositories().getRepositoryUrls(req, user, repository);
+ List<RepositoryUrl> repositoryUrls = app().gitblit().getRepositoryUrls(req, user, repository);
RepositoryUrl primaryUrl = repositoryUrls.size() == 0 ? null : repositoryUrls.get(0);
String url = primaryUrl != null ? primaryUrl.url : "";
diff --git a/src/main/java/com/gitblit/wicket/pages/LogoutPage.java b/src/main/java/com/gitblit/wicket/pages/LogoutPage.java index f7be99ae..d99c1466 100644 --- a/src/main/java/com/gitblit/wicket/pages/LogoutPage.java +++ b/src/main/java/com/gitblit/wicket/pages/LogoutPage.java @@ -27,8 +27,7 @@ public class LogoutPage extends BasePage { super();
GitBlitWebSession session = GitBlitWebSession.get();
UserModel user = session.getUser();
- app().session().setCookie((WebResponse) getResponse(), null);
- app().session().logout(user);
+ app().session().logout(((WebResponse) getResponse()).getHttpServletResponse(), user);
session.invalidate();
/*
diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java index e19c1955..0552c304 100644 --- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java @@ -139,7 +139,7 @@ public abstract class RepositoryPage extends RootPage { UserRepositoryPreferences prefs = user.getPreferences().getRepositoryPreferences(getRepositoryModel().name);
prefs.starred = star;
try {
- app().users().updateUserModel(user.username, user, false);
+ app().gitblit().updateUserModel(user.username, user, false);
} catch (GitBlitException e) {
logger.error("Failed to update user " + user.username, e);
error(getString("gb.failedToUpdateUser"), false);
diff --git a/src/main/java/com/gitblit/wicket/pages/RootPage.java b/src/main/java/com/gitblit/wicket/pages/RootPage.java index 98a8cb32..1a43bf1e 100644 --- a/src/main/java/com/gitblit/wicket/pages/RootPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RootPage.java @@ -252,7 +252,7 @@ public abstract class RootPage extends BasePage { // Set Cookie
if (app().settings().getBoolean(Keys.web.allowCookieAuthentication, false)) {
WebResponse response = (WebResponse) getRequestCycle().getResponse();
- app().session().setCookie(response, user);
+ app().session().setCookie(response.getHttpServletResponse(), user);
}
if (!session.continueRequest()) {
diff --git a/src/main/java/com/gitblit/wicket/pages/SessionPage.java b/src/main/java/com/gitblit/wicket/pages/SessionPage.java index 886dd6e6..a10102f4 100644 --- a/src/main/java/com/gitblit/wicket/pages/SessionPage.java +++ b/src/main/java/com/gitblit/wicket/pages/SessionPage.java @@ -70,7 +70,7 @@ public abstract class SessionPage extends WebPage { // Set Cookie
WebResponse response = (WebResponse) getRequestCycle().getResponse();
- app().session().setCookie(response, user);
+ app().session().setCookie(response.getHttpServletResponse(), user);
session.continueRequest();
}
|