summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/wicket/pages
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-01-12 19:51:42 -0500
committerJames Moger <james.moger@gitblit.com>2013-01-12 19:51:42 -0500
commitabd3cc2d610981493b5e9333108d271ae37f7726 (patch)
tree91984b32e19b8833f062c2f48de23e2065bb68ff /src/com/gitblit/wicket/pages
parente4e68298c2f55c93dc2464e26a24b119a649e642 (diff)
downloadgitblit-abd3cc2d610981493b5e9333108d271ae37f7726.tar.gz
gitblit-abd3cc2d610981493b5e9333108d271ae37f7726.zip
Refresh authenticated user model for each page request (issue-186)
Diffstat (limited to 'src/com/gitblit/wicket/pages')
-rw-r--r--src/com/gitblit/wicket/pages/BasePage.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/gitblit/wicket/pages/BasePage.java b/src/com/gitblit/wicket/pages/BasePage.java
index 9f981353..c733c992 100644
--- a/src/com/gitblit/wicket/pages/BasePage.java
+++ b/src/com/gitblit/wicket/pages/BasePage.java
@@ -136,7 +136,10 @@ public abstract class BasePage extends WebPage {
private void login() {
GitBlitWebSession session = GitBlitWebSession.get();
if (session.isLoggedIn() && !session.isSessionInvalidated()) {
- // already have a session
+ // already have a session, refresh usermodel to pick up
+ // any changes to permissions or roles (issue-186)
+ UserModel user = GitBlit.self().getUserModel(session.getUser().username);
+ session.setUser(user);
return;
}