summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/models
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2013-01-04 17:23:23 -0500
committerJames Moger <james.moger@gitblit.com>2013-01-04 17:23:23 -0500
commit4e3c152fa7e97200855ba0d2716362dbe7976920 (patch)
tree6ecaa64074a0ccf4f3943592606eef4f02d6022f /src/com/gitblit/models
parent8427e93f25fb79bc39dbd31ce13fab637e7cfdff (diff)
downloadgitblit-4e3c152fa7e97200855ba0d2716362dbe7976920.tar.gz
gitblit-4e3c152fa7e97200855ba0d2716362dbe7976920.zip
Support local accounts with LdapUserService and RedmineUserService (issue-183)
Diffstat (limited to 'src/com/gitblit/models')
-rw-r--r--src/com/gitblit/models/UserModel.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/gitblit/models/UserModel.java b/src/com/gitblit/models/UserModel.java
index ac67ff78..54e81cb5 100644
--- a/src/com/gitblit/models/UserModel.java
+++ b/src/com/gitblit/models/UserModel.java
@@ -29,6 +29,7 @@ import java.util.TreeSet;
import com.gitblit.Constants.AccessPermission;
import com.gitblit.Constants.AccessRestrictionType;
+import com.gitblit.Constants.AccountType;
import com.gitblit.Constants.AuthorizationControl;
import com.gitblit.Constants.PermissionType;
import com.gitblit.Constants.RegistrantType;
@@ -73,15 +74,22 @@ public class UserModel implements Principal, Serializable, Comparable<UserModel>
// non-persisted fields
public boolean isAuthenticated;
+ public AccountType accountType;
public UserModel(String username) {
this.username = username;
this.isAuthenticated = true;
+ this.accountType = AccountType.LOCAL;
}
private UserModel() {
this.username = "$anonymous";
this.isAuthenticated = false;
+ this.accountType = AccountType.LOCAL;
+ }
+
+ public boolean isLocalAccount() {
+ return accountType.isLocal();
}
/**