From 04a98505a4ab8f48aee22800fcac193d9367d0ae Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 29 Nov 2013 11:05:51 -0500
Subject: [PATCH] Refactor user services and separate authentication (issue-281)

---
 src/main/java/com/gitblit/manager/IAuthenticationManager.java |   43 ++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 42 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/gitblit/manager/ISessionManager.java b/src/main/java/com/gitblit/manager/IAuthenticationManager.java
similarity index 63%
rename from src/main/java/com/gitblit/manager/ISessionManager.java
rename to src/main/java/com/gitblit/manager/IAuthenticationManager.java
index 29f1709..093f44d 100644
--- a/src/main/java/com/gitblit/manager/ISessionManager.java
+++ b/src/main/java/com/gitblit/manager/IAuthenticationManager.java
@@ -18,9 +18,10 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import com.gitblit.models.TeamModel;
 import com.gitblit.models.UserModel;
 
-public interface ISessionManager extends IManager {
+public interface IAuthenticationManager extends IManager {
 
 	/**
 	 * Authenticate a user based on HTTP request parameters.
@@ -69,4 +70,44 @@
 	 */
 	void logout(HttpServletResponse response, UserModel user);
 
+	/**
+	 * Does the user service support changes to credentials?
+	 *
+	 * @return true or false
+	 * @since 1.0.0
+	 */
+	boolean supportsCredentialChanges(UserModel user);
+
+	/**
+	 * Returns true if the user's display name can be changed.
+	 *
+	 * @param user
+	 * @return true if the user service supports display name changes
+	 */
+	boolean supportsDisplayNameChanges(UserModel user);
+
+	/**
+	 * Returns true if the user's email address can be changed.
+	 *
+	 * @param user
+	 * @return true if the user service supports email address changes
+	 */
+	boolean supportsEmailAddressChanges(UserModel user);
+
+	/**
+	 * Returns true if the user's team memberships can be changed.
+	 *
+	 * @param user
+	 * @return true if the user service supports team membership changes
+	 */
+	boolean supportsTeamMembershipChanges(UserModel user);
+
+	/**
+	 * Returns true if the team memberships can be changed.
+	 *
+	 * @param user
+	 * @return true if the team memberships can be changed
+	 */
+	boolean supportsTeamMembershipChanges(TeamModel team);
+
 }
\ No newline at end of file

--
Gitblit v1.9.1