]> source.dussan.org Git - gitblit.git/commitdiff
Remove admin permission setting from Redmine auth provider (issue-368)
authorJames Moger <james.moger@gitblit.com>
Fri, 21 Feb 2014 14:05:42 +0000 (09:05 -0500)
committerJames Moger <james.moger@gitblit.com>
Fri, 21 Feb 2014 14:05:42 +0000 (09:05 -0500)
This feature depended on an undocumented behavior of Redmine.  If/when
Redmine groups are mapped to Gitblit teams, we can reconsider setting
the admin permission (issue-321).

releases.moxie
src/main/java/com/gitblit/auth/RedmineAuthProvider.java

index 654871393ef1e2bef3d55fc76f815afaaf714b91..a533977858ba4255b10274d3d515be6b1b1146e6 100644 (file)
@@ -21,6 +21,7 @@ r20: {
        - Fixed NPE when attempting to add a permission without a registrant (issue-344)
        - Invalidate all cached repository data on "clear cache" (issue-346)
        - Fix chart failures when an apostrophe is in a user display name (issue-350, pr-128)
+       - Stop setting admin permission based on undocumented Redmine REST API behavior (issue-368)
        - Fix support url decoding with non-ascii characters (pr-136)
        - Fix potential NPE on removing uncached repository from cache
        - Ignore the default contents of .git/description file
index 04adc459fb3272d7ff12e7d5c5db912618fc0e1a..7e957ecbbc91b668f1051b7594c5741cd4f7c50d 100644 (file)
@@ -134,11 +134,6 @@ public class RedmineAuthProvider extends UsernamePasswordAuthenticationProvider
         user.displayName = current.user.firstname + " " + current.user.lastname;
         user.emailAddress = current.user.mail;
         user.password = Constants.EXTERNAL_ACCOUNT;
-        if (!StringUtils.isEmpty(current.user.login)) {
-               // only admin users can get login name
-               // evidently this is an undocumented behavior of Redmine
-               user.canAdmin = true;
-        }
 
         // TODO consider Redmine group mapping for team membership
         // http://www.redmine.org/projects/redmine/wiki/Rest_Users