diff options
author | James Moger <james.moger@gitblit.com> | 2012-10-10 00:05:34 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2012-10-10 00:05:34 -0400 |
commit | 20714aee0d2d2a989d93d6065e081aed8ac85fbf (patch) | |
tree | ac1dfc4f2519b766ad1306a9fd2d2e8e9ecf8ac8 /src/com/gitblit/GitblitUserService.java | |
parent | c890e1f7d3f5cd83025b1d993cedf4990de63897 (diff) | |
download | gitblit-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/GitblitUserService.java')
-rw-r--r-- | src/com/gitblit/GitblitUserService.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/gitblit/GitblitUserService.java b/src/com/gitblit/GitblitUserService.java index b4640b58..141ad8f1 100644 --- a/src/com/gitblit/GitblitUserService.java +++ b/src/com/gitblit/GitblitUserService.java @@ -168,6 +168,11 @@ public class GitblitUserService implements IUserService { }
@Override
+ public boolean updateUserModels(List<UserModel> models) {
+ return serviceImpl.updateUserModels(models);
+ }
+
+ @Override
public boolean updateUserModel(String username, UserModel model) {
if (supportsCredentialChanges()) {
if (!supportsTeamMembershipChanges()) {
@@ -232,6 +237,7 @@ public class GitblitUserService implements IUserService { }
@Override
+ @Deprecated
public boolean setTeamnamesForRepositoryRole(String role, List<String> teamnames) {
return serviceImpl.setTeamnamesForRepositoryRole(role, teamnames);
}
@@ -247,6 +253,11 @@ public class GitblitUserService implements IUserService { }
@Override
+ public boolean updateTeamModels(List<TeamModel> models) {
+ return serviceImpl.updateTeamModels(models);
+ }
+
+ @Override
public boolean updateTeamModel(String teamname, TeamModel model) {
if (!supportsTeamMembershipChanges()) {
// teams are externally controlled - copy from original model
@@ -275,6 +286,7 @@ public class GitblitUserService implements IUserService { }
@Override
+ @Deprecated
public boolean setUsernamesForRepositoryRole(String role, List<String> usernames) {
return serviceImpl.setUsernamesForRepositoryRole(role, usernames);
}
|