diff options
author | James Moger <james.moger@gitblit.com> | 2011-04-14 18:29:10 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2011-04-14 18:29:10 -0400 |
commit | fc948cacef9c9b8c0a1e84cbc082ca67cd5f68d9 (patch) | |
tree | 4287442c5d74c26c3e4826bc79d02c804cd0f8c4 /src/com/gitblit/wicket/GitBlitWebSession.java | |
parent | 94b96b5a98bef254128ccc4f5fc0e0c4376324e4 (diff) | |
download | gitblit-fc948cacef9c9b8c0a1e84cbc082ca67cd5f68d9.tar.gz gitblit-fc948cacef9c9b8c0a1e84cbc082ca67cd5f68d9.zip |
Authenticate the webapp against the same realm as the git servlet.
Right now the implementation is hard-coded to pass the realm into a
singleton. This won't work for a WAR distribution so I will
need to figure out how to properly authenticate the webapp using form
authentication and the git servlet using basic authentication - host
against the same realm.
Diffstat (limited to 'src/com/gitblit/wicket/GitBlitWebSession.java')
-rw-r--r-- | src/com/gitblit/wicket/GitBlitWebSession.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/com/gitblit/wicket/GitBlitWebSession.java b/src/com/gitblit/wicket/GitBlitWebSession.java index b2106e7b..34e597f0 100644 --- a/src/com/gitblit/wicket/GitBlitWebSession.java +++ b/src/com/gitblit/wicket/GitBlitWebSession.java @@ -28,6 +28,13 @@ public final class GitBlitWebSession extends WebSession { return user != null;
}
+ public boolean canAdmin() {
+ if (user == null) {
+ return false;
+ }
+ return user.canAdmin();
+ }
+
public User getUser() {
return user;
}
|