- Oct 12, 2017
-
-
Douwe Maan authored
-
- Oct 05, 2017
-
-
Alejandro Rodríguez authored
-
- Sep 29, 2017
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Sep 28, 2017
-
-
Douwe Maan authored
-
- Aug 09, 2017
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Jul 27, 2017
-
-
Douwe Maan authored
-
- Jun 28, 2017
-
-
Timothy Andrew authored
-
Timothy Andrew authored
- Scope declarations of the form: allow_access_with_scope :read_user, if: -> (request) { request.get? } will only apply for `GET` requests - Add a negative test to a `POST` endpoint in the `users` API to test this. Also test for this case in the `AccessTokenValidationService` unit tests.
-
- Jun 14, 2017
-
-
Robert Speicher authored
-
- May 01, 2017
-
-
Robert Speicher authored
-
- Apr 26, 2017
-
-
Timothy Andrew authored
- Currently, (for example) admins can't delete snippets for blocked users, which is an unexpected limitation. - We modify `authenticate!` to conduct the `access_api` policy check against the `initial_current_user`, instead of the user being impersonated. - Update CHANGELOG for !10842
-
- Apr 21, 2017
-
-
Jacopo authored
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs. Removed unnecessary usage of `api:true`
-
- Mar 09, 2017
-
-
http://jneen.net/ authored
true is neither nil nor a user and doesn't make sense as the return value of `current_user`
-
- Jan 19, 2017
-
-
Kamil Trzcińśki authored
-
- Dec 23, 2016
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Dec 16, 2016
-
-
Timothy Andrew authored
- Use whitespace to separate the setup, expectation and teardown phases.
-
Timothy Andrew authored
- Move the `Oauth2::AccessTokenValidationService` class to `AccessTokenValidationService`, since it is now being used for personal access token validation as well. - Each API endpoint declares the scopes it accepts (if any). Currently, the top level API module declares the `api` scope, and the `Users` API module declares the `read_user` scope (for GET requests). - Move the `find_user_by_private_token` from the API `Helpers` module to the `APIGuard` module, to avoid littering `Helpers` with more auth-related methods to support `find_user_by_private_token`
-
- Dec 13, 2016
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Dec 12, 2016
-
-
Rémy Coutable authored
The issue was arising when `#current_user` was called a second time after a user was impersonated: the `User#is_admin?` check would be performed on it and it would fail. Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Dec 07, 2016
-
-
tiagonbotelho authored
-
- Dec 01, 2016
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Nov 01, 2016
-
-
Felipe Artur authored
-
- Oct 27, 2016
-
-
Rémy Coutable authored
Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Sep 23, 2016
-
-
Nick Thomas authored
-
- Sep 19, 2016
-
-
Nick Thomas authored
The practical effect of this commit is to make the API check the Rails session cookie for authentication details. If the cookie is present and valid, it will be used to authenticate. The API now has several authentication options for users. They follow in this order of precedence: * Authentication token * Personal access token * OAuth2 Bearer token (Doorkeeper - application access) * Rails session cookie
-
- Aug 24, 2016
-
-
Stan Hu authored
Closes #21043
-
- Aug 09, 2016
-
-
tiagonbotelho authored
-
- Jul 19, 2016
-
-
Robert Schilling authored
-
- Jul 18, 2016
-
-
Rémy Coutable authored
This reverts commit 530f5158. See !4892. Signed-off-by:
Rémy Coutable <remy@rymai.me>
-
- Jul 13, 2016
-
-
Robert Speicher authored
This reverts commit 9ca633eb, reversing changes made to fb229bbf.
-
Timothy Andrew authored
1. Don't use case statements for dispatch anymore. This leads to a lot of duplication, and makes the logic harder to follow. 2. Remove duplicated logic. - For example, the `can_push_to_branch?` exists, but we also have a different way of checking the same condition within `change_access_check`. - This kind of duplication is removed, and the `can_push_to_branch?` method is used in both places. 3. Move checks returning true/false to `UserAccess`. - All public methods in `GitAccess` now return an instance of `GitAccessStatus`. Previously, some methods would return true/false as well, which was confusing. - It makes sense for these kinds of checks to be at the level of a user, so the `UserAccess` class was repurposed for this. The prior `UserAccess.allowed?` classmethod is converted into an instance method. - All external uses of these checks have been migrated to use the `UserAccess` class 4. Move the "change_access_check" into a separate class. - Create the `GitAccess::ChangeAccessCheck` class to run these checks, which are quite substantial. - `ChangeAccessCheck` returns an instance of `GitAccessStatus` as well. 5. Break out the boolean logic in `ChangeAccessCheck` into `if/else` chains - this seems more readable. 6. I can understand that this might look like overkill for !4892, but I think this is a good opportunity to clean it up. - http://martinfowler.com/bliki/OpportunisticRefactoring.html
-
- Jul 01, 2016
-
-
Grzegorz Bizon authored
-
- Jun 16, 2016
-
-
Timothy Andrew authored
-
- Apr 28, 2016
-
-
Timothy Andrew authored
- Makes the MR easier to read; this can go in a separate MR - This is a (sort of) revert of 99bea01
-
Timothy Andrew authored
-
Timothy Andrew authored
- And fix all tests.
-
- Oct 23, 2015
-
-
Jason Lee authored
Rails Autoload find file to require is use , APIHelpers -> api_helpers.rb, not helpers.rb;
-
- Jun 22, 2015
-
-
Robert Speicher authored
-
Robert Speicher authored
-
- Feb 12, 2015
-
-
Jeroen van Baarsen authored
Signed-off-by:
Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
-