Alejandro Rodríguez
de33a5bd53
Prevent errors from non-functional notify_post_receive endpoint
2017-05-18 15:33:43 -04:00
Alejandro Rodríguez
c45341c816
Generate and handle a gl_repository param to pass around components
...
This new param allows us to share project information between components
that don't share or don't have access to the same filesystem
mountpoints, for example between Gitaly and Rails or between Rails and
Gitlab-Shell hooks. The previous parameters are still supported, but if
found, gl_repository is prefered. The old parameters should be deprecated
once all components support the new format.
2017-05-03 17:37:30 -03:00
Jacopo
ff76adb547
Unnecessary "include WaitForAjax" and "include ApiHelpers"
...
Removed all the unnecessary include of `WaitForAjax` and `ApiHelpers` in the specs.
Removed unnecessary usage of `api:true`
2017-04-21 22:32:02 +02:00
Rémy Coutable
cfe19b795e
Add a new Gitlab::UserActivities class to track user activities
...
This new class uses a Redis Hash instead of a Sorted Set.
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-14 15:20:55 +02:00
James Lopez
3cb84e06b7
Remove user activities table and use redis instead of PG for recording activities
...
Refactored specs and added a post deployment migration to remove the activity users table.
2017-04-14 15:20:55 +02:00
James Lopez
2951a8543e
Add user activity service and spec. Also added relevant - NOT offline - migration
...
It uses a user activity table instead of a column in users.
Tested with mySQL and postgreSQL
2017-04-14 15:20:55 +02:00
Rémy Coutable
710cd82cc1
Set Git-specific env in /api/internal/allowed
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-10 16:10:18 +02:00
Jacob Vosmaer
1904c80f3d
Change socket_path to gitaly_address
2017-03-29 14:48:05 +02:00
Jacob Vosmaer
8f50ef5e75
Separate GRPC channels per repository storage
2017-03-29 14:48:05 +02:00
Alex Sanford
68e3fa0e58
Add ability to disable Merge Request URL on push
2017-03-17 12:35:39 +00:00
Alejandro Rodríguez
f8fa6e6f47
Add internal endpoint to notify post-receive to Gitaly
2017-03-01 18:46:59 -03:00
Robert Speicher
9a31ecbef2
Use `:empty_project` where possible in request specs
2017-01-26 18:52:10 -05:00
Grzegorz Bizon
632c2939bb
Revert "Merge branch 'revert-9cac0317' into 'master'
"
...
This reverts commit c20934869f , reversing
changes made to 4b7ec44b91 .
2017-01-23 16:35:24 +01:00
Grzegorz Bizon
baeaa97ef4
Revert "Merge branch 'dont-persist-application-settings-in-test-env' into 'master'"
...
This reverts merge request !8573
2017-01-21 22:55:35 +00:00
Robert Speicher
9cac031769
Merge branch 'dont-persist-application-settings-in-test-env' into 'master'
...
Don't persist application settings in test env
See merge request !8573
2017-01-20 15:42:54 +00:00
Rémy Coutable
9c560b5cdf
Replace many :project with :empty_projects in API specs
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-17 11:41:27 -05:00
Rémy Coutable
f6cc29ed83
Don't persist ApplicationSetting in test env
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-01-15 01:07:29 -05:00
Livier
eb4f15571d
Changed API spec files to describe the correct class
...
Restore changes for api spec files
Fix error in rspec Users
Delete extra space Repositories-spec
2016-11-28 10:55:27 -07:00
Rémy Coutable
03933cd279
Merge branch 'fix-tests-for-different-host' into 'master'
...
Use `Gitlab.config.gitlab.host` over `'localhost'`
Use `Gitlab.config.gitlab.host` over `'localhost'`
This would fix long standing failures running tests on
my development machine, which set `Gitlab.config.gitlab.host`
to another host because it's not my local computer. Now I
finally cannot withstand it and decided to fix them once and
for all.
See merge request !7562
2016-11-18 17:46:44 +00:00
Lin Jen-Shin
9c4e0d6445
Use `Gitlab.config.gitlab.host` over `'localhost'`
...
This would fix long standing failures running tests on
my development machine, which set `Gitlab.config.gitlab.host`
to another host because it's not my local computer. Now I
finally cannot withstand it and decided to fix them once and
for all.
2016-11-18 20:17:10 +08:00
Rémy Coutable
2fb862ccc6
Rely on Gitlab::Shell public API, not reading internal files it may use
...
It ensures we rely on `Gitlab::Shell`'s public API and not on its
internal. Since `Gitlab::Shell` is caching the value of its token, the
only way to get the correct token is to call
`Gitlab::Shell.secret_token`, not to read the
`Gitlab.config.gitlab_shell.secret_file` file!
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-18 12:02:45 +01:00
Nick Thomas
1c994dbc05
Fix POST /internal/allowed to cope with gitlab-shell v4.0.0 project paths
...
gitlab-shell v3.6.6 would give project paths like so:
* namespace/project
gitlab-shell v4.0.0 can give project paths like so:
* /namespace1/namespace2/project
* /namespace/project
* /path/to/repository/storage/namespace1/namespace2/project
* /path/to/repository/storage/namespace/project
2016-11-16 14:30:56 +00:00
Patricio Cano
2772109ac1
Handle LFS token creation and retrieval in the same method, and in the same Redis connection.
...
Reset expiry time of token, if token is retrieved again before it expires.
2016-09-28 12:13:48 -05:00
Kamil Trzcinski
3c1bb3432b
Revert "Revert all changes introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043 "
...
This reverts commit 6d43c95b70 .
2016-09-19 16:34:32 +02:00
Kamil Trzcinski
6d43c95b70
Revert all changes introduced by https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6043
2016-09-19 13:45:28 +02:00
Patricio Cano
be09bcf074
Refactored authentication code to make it a bit clearer, added test for wrong SSH key.
2016-09-15 12:21:00 -05:00
Patricio Cano
71aff7f6a3
Use special characters for `lfs+deploy-key` to prevent a someone from creating a user with this username, and method name refactoring.
2016-09-15 12:21:00 -05:00
Patricio Cano
c144db2935
Better authentication handling, syntax fixes and better actor handling for LFS Tokens
2016-09-15 12:21:00 -05:00
Patricio Cano
48f1a61fd5
Refactored LFS auth logic when using SSH to use its own API endpoint `/lfs_authenticate` and added tests.
2016-09-15 12:21:00 -05:00
Patricio Cano
cb85cf1f0a
Refactor LFS token logic to use a Redis key instead of a DB field, making it a 1 use only token.
2016-09-15 12:21:00 -05:00
Patricio Cano
e40e3fdc82
Added LFS support to SSH
...
- Required on the GitLab Rails side is mostly authentication and API related.
2016-09-15 12:21:00 -05:00
Drew Blessing
8b6154c145
Minor edits to two_factor_recovery_codes API error catching
2016-08-31 19:41:55 -05:00
Drew Blessing
bba8577351
Add two factor recovery endpoint to internal API
2016-08-24 17:50:57 -05:00
Scott Le
6109daf480
api for generating new merge request
...
DRY code + fix rubocop
Add more test cases
Append to changelog
DRY changes list
find_url service for merge_requests
use GET for getting merge request links
remove files
rename to get_url_service
reduce loop
add test case for cross project
refactor tiny thing
update changelog
2016-08-11 23:37:00 +07:00
Alejandro Rodríguez
e94d3834c7
Fix a bug where the project's repository path was returned instead of the wiki path
2016-07-15 21:31:26 -04:00
Patricio Cano
fbaabb3911
Rename `enabled_git_access_protocols` to singular.
2016-07-05 16:54:22 -05:00
Patricio Cano
42fb2516d9
Add more tests to the allowed protocols feature
2016-07-05 16:54:22 -05:00
Alejandro Rodríguez
86359ec854
Refactor repository paths handling to allow multiple git mount points
2016-06-29 22:30:31 -04:00
Z.J. van de Weg
abca19da8b
Use HTTP matchers if possible
2016-06-27 20:10:42 +02:00
James Lopez
3ac202c30f
fixed merge conflict and refactored specs
2016-02-29 10:59:16 +01:00
James Lopez
c401e8338b
updated internal.rb and spec based on MR feedback
2016-02-26 10:40:30 +01:00
James Lopez
d377948931
fix for projects ending in .wiki
2016-02-24 15:54:36 +01:00
Jakub Jirutka
ed3298fc01
Allow to configure gitlab_shell_secret location
2015-05-16 21:46:06 +02:00
Dmitriy Zaporozhets
558dd81197
Improve broadcast message API
2015-02-18 14:58:20 -08:00
Jeroen van Baarsen
0c4a70a306
Updated rspec to rspec 3.x syntax
...
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
Douwe Maan
42422dcc6a
Add internal broadcast message API.
2015-02-07 16:41:30 +01:00
Dmitriy Zaporozhets
612b8806dd
Fix internal API for missing project or key
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-12-01 16:55:33 +02:00
Valery Sizov
53bf52f191
Better message for failed pushes because of git hooks
...
Conflicts:
lib/gitlab/git_access.rb
spec/lib/gitlab/git_access_spec.rb
2014-11-18 13:10:07 +02:00
Valery Sizov
b5763e91cd
add gitlab-shell identification
2014-10-15 20:03:25 +03:00
Dmitriy Zaporozhets
0a7dea29aa
/api/allowed use POST now
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-03 09:06:16 +03:00