summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/IUserService.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-10-10 00:05:34 -0400
committerJames Moger <james.moger@gitblit.com>2012-10-10 00:05:34 -0400
commit20714aee0d2d2a989d93d6065e081aed8ac85fbf (patch)
treeac1dfc4f2519b766ad1306a9fd2d2e8e9ecf8ac8 /src/com/gitblit/IUserService.java
parentc890e1f7d3f5cd83025b1d993cedf4990de63897 (diff)
downloadgitblit-20714aee0d2d2a989d93d6065e081aed8ac85fbf.tar.gz
gitblit-20714aee0d2d2a989d93d6065e081aed8ac85fbf.zip
Finer-grained repository access permissions (issue 36)
Implemented discrete repository access permissions to replace the really primitive course-grained permissions used to this point. This implementation allows for finer-grained access control, but still falls short of integrated, branch-based permissions sought by some. Access permissions follow the conventions established by Gitosis and Gitolite so they should feel immediately comfortable to experienced users. This permissions infrastructure is complete and works exactly as expected. Unfortunately, there is no ui in this commit to change permissions, that will be forthcoming. In the meantime, Gitblit hot-reloads users.conf so the permissions can be manipulated at runtime with a text editor. The following per-repository permissions are now supported: - V (view in web ui, RSS feeds, download zip) - R (clone) - RW (clone and push) - RWC (clone and push with ref creation) - RWD (clone and push with ref creation, deletion) - RW+ (clone and push with ref creation, deletion, rewind) And a users.conf entry looks something like this: [user "hannibal"] password = bossman repository = RWD:topsecret.git
Diffstat (limited to 'src/com/gitblit/IUserService.java')
-rw-r--r--src/com/gitblit/IUserService.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/com/gitblit/IUserService.java b/src/com/gitblit/IUserService.java
index 8822d024..059d648a 100644
--- a/src/com/gitblit/IUserService.java
+++ b/src/com/gitblit/IUserService.java
@@ -127,6 +127,15 @@ public interface IUserService {
boolean updateUserModel(UserModel model);
/**
+ * Updates/writes all specified user objects.
+ *
+ * @param models a list of user models
+ * @return true if update is successful
+ * @since 1.2.0
+ */
+ boolean updateUserModels(List<UserModel> models);
+
+ /**
* Adds/updates a user object keyed by username. This method allows for
* renaming a user.
*
@@ -205,7 +214,8 @@ public interface IUserService {
* @param teamnames
* @return true if successful
* @since 0.8.0
- */
+ */
+ @Deprecated
boolean setTeamnamesForRepositoryRole(String role, List<String> teamnames);
/**
@@ -227,6 +237,15 @@ public interface IUserService {
boolean updateTeamModel(TeamModel model);
/**
+ * Updates/writes all specified team objects.
+ *
+ * @param models a list of team models
+ * @return true if update is successful
+ * @since 1.2.0
+ */
+ boolean updateTeamModels(List<TeamModel> models);
+
+ /**
* Updates/writes and replaces a complete team object keyed by teamname.
* This method allows for renaming a team.
*
@@ -277,6 +296,7 @@ public interface IUserService {
* @param usernames
* @return true if successful
*/
+ @Deprecated
boolean setUsernamesForRepositoryRole(String role, List<String> usernames);
/**