-
- Downloads
Dont expose user email via API
To prevent leaking of users info we reduce amount of user information
retrieved via API for normal users.
What user can get via API:
* if not admin: only id, state, name, username and avatar_url
* if admin: all user information
* about himself: all informaion
Signed-off-by:
Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
- app/assets/javascripts/project_users_select.js.coffee 2 additions, 6 deletionsapp/assets/javascripts/project_users_select.js.coffee
- app/assets/javascripts/users_select.js.coffee 2 additions, 6 deletionsapp/assets/javascripts/users_select.js.coffee
- app/controllers/application_controller.rb 1 addition, 2 deletionsapp/controllers/application_controller.rb
- app/helpers/application_helper.rb 8 additions, 10 deletionsapp/helpers/application_helper.rb
- app/models/user.rb 8 additions, 0 deletionsapp/models/user.rb
- lib/api/entities.rb 15 additions, 16 deletionslib/api/entities.rb
- lib/api/internal.rb 0 additions, 1 deletionlib/api/internal.rb
- lib/api/projects.rb 1 addition, 1 deletionlib/api/projects.rb
- lib/api/users.rb 14 additions, 4 deletionslib/api/users.rb
- spec/requests/api/users_spec.rb 2 additions, 2 deletionsspec/requests/api/users_spec.rb
Loading
Please register or sign in to comment