Skip to content

Instantly share code, notes, and snippets.

@nanoant
Created November 30, 2015 20:27
Show Gist options
  • Save nanoant/f6f3e2f2fe465f371c6b to your computer and use it in GitHub Desktop.
Save nanoant/f6f3e2f2fe465f371c6b to your computer and use it in GitHub Desktop.
Enables exporting bcrypt password hash using GitLab API when using admin token
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 883a5e1..5c08707 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -29,6 +29,7 @@ module API
expose :can_create_group?, as: :can_create_group
expose :can_create_project?, as: :can_create_project
expose :two_factor_enabled
+ expose :encrypted_password, as: :password_hash # custom patch
end
class UserLogin < UserFull
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment