blackst0ne
11aff97d88
Remove the User#is_admin? method
2017-04-09 13:20:57 +11:00
Kushal Pandya
8a5ca1121b
Merge branch 'master' into '18471-restrict-tag-pushes-protected-tags'
...
# Conflicts:
# spec/lib/gitlab/import_export/all_models.yml
2017-04-06 21:12:16 +00:00
James Edwards-Jones
7d17fcea84
Fix projected import failing on missing relations
2017-04-06 15:48:20 +01:00
Shinya Maeda
a67aff6d39
Add Import/Export Setting for trigger_schedule. Remove ref validation.
2017-04-06 23:46:58 +09:00
Shinya Maeda
01cea0d59d
Suppress Import/Export function warnings. Add comment for confirmation.
2017-04-06 23:46:58 +09:00
Kushal Pandya
18506d4b8b
Merge branch 'master' into '18471-restrict-tag-pushes-protected-tags'
...
# Conflicts:
# app/assets/javascripts/dispatcher.js
# app/assets/stylesheets/pages/projects.scss
2017-04-06 09:46:50 +00:00
James Lopez
22d7ae8002
Fix issues importing forked projects
2017-04-04 16:34:19 +00:00
James Edwards-Jones
07d7d8e659
Renamed ProtectedTag push_access_levels to create_access_levels
2017-04-04 03:38:58 +01:00
James Edwards-Jones
3bb3a6886f
Attempt to fix import/export of push_access_levels for protected tags
2017-04-04 02:19:04 +01:00
James Edwards-Jones
9f4b8dba80
Clean up non TODO rubocop errors
2017-04-03 20:06:06 +01:00
Kamil Trzciński
12dd5ac221
All CI offline migrations
2017-03-17 23:06:11 +00:00
Dmitriy Zaporozhets
5b52adcedb
Fix group members method for project import/export
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-03-09 13:40:57 +02:00
Sean McGivern
811e598f60
Enable and autocorrect the CustomErrorClass cop
2017-03-01 15:28:10 +00:00
Rémy Coutable
d8752015b3
Merge branch 'fix/import-hooks' into 'master'
...
Fix import webhooks performance issue
Closes #27958
See merge request !9197
2017-02-16 15:00:40 +00:00
James Lopez
b3fb5b4f26
Use gitlab shell import instead of manually creating the webhooks
...
Also update repo restorer to use project wiki method.
2017-02-16 10:02:26 +01:00
Dmitriy Zaporozhets
6676b4f0dd
Use Namespace#full_path instead of Namespace#path
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-02-14 18:38:20 +02:00
James Lopez
8409340b3b
Add missing group members to export for I/E
2017-02-07 11:06:05 +01:00
James Lopez
8ea1dafe83
use destroy_all
2017-01-31 19:20:35 +01:00
James Lopez
918eaba0c3
remove old project members from project
2017-01-31 16:32:26 +01:00
James Lopez
017a5068f6
fix spec failure
2017-01-30 14:26:32 +01:00
James Lopez
1a2d13c821
programmatically remove encrypted attributes. Added relevant spec.
2017-01-30 12:34:32 +01:00
James Lopez
eeb13c16d1
rename method and added note to export file spec about new encrypted attributes
2017-01-30 12:34:32 +01:00
James Lopez
6a2b976c66
fix typo
2017-01-30 12:34:32 +01:00
James Lopez
e589c7e848
Ignore encrypted attributes in Import/Export
...
* Regenerates tokens for all models that have them
* Remove variables, since they are basically just storing encrypted data
* Bumped version up to 0.1.6
* Updated related docs
2017-01-30 12:34:32 +01:00
Rémy Coutable
4af1f18639
Merge branch 'fix/import-users' into 'master'
...
Fix import no longer mapping users as admin
Closes #25346
See merge request !8625
2017-01-20 16:03:44 +00:00
James Lopez
e8396d8e73
fix member mapper spec
2017-01-20 14:37:52 +01:00
James Lopez
e8a9682bc9
fix typo
2017-01-19 09:44:20 +01:00
James Lopez
17c099161e
fix and refactor note user mapping
2017-01-18 17:40:24 +01:00
James Lopez
b3bb8dc46f
added spec replicating the problem
2017-01-18 15:46:54 +01:00
James Lopez
35442766cf
do not map usersat all unless admin
2017-01-18 14:13:01 +01:00
Ruben Davila
17196a2ff3
Backport backend work for time tracking.
2017-01-15 11:10:04 -05:00
James Lopez
5452747729
Fix error importing label priorities and added relevant spec
2016-12-21 10:33:20 +01:00
Rémy Coutable
8c8c4f8c5a
Merge branch 'fix/import-export-mr-error' into 'master'
...
Fix import/export merge requests error
When MWBS is set and the MR exported/imported an error gets thrown. We should ignore this so it can succeed as the merge user may no longer exist in the target instance.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/24009 and https://gitlab.com/gitlab-com/support-forum/issues/1345
See merge request !8134
2016-12-19 18:03:06 +00:00
James Lopez
0631c7bcdc
Fix MR issue to do with merge user
2016-12-19 16:52:38 +01:00
James Lopez
786457ca3e
Fix for missing service when importing from EE to CE
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-12-19 16:32:26 +01:00
James Lopez
d6edecdeec
Fix duplicated build token problem and added relevant spec
2016-12-19 11:26:57 +01:00
Douwe Maan
dc9b3db8b0
Merge branch 'fix/import-export-symlink-vulnerability' into 'security'
...
Fix symlink vulnerability in Import/Export
Replaces https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2018 made by @james
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23822
See merge request !2022
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-03 16:04:18 +01:00
Douwe Maan
cfb511ea69
Merge branch 'fix/import-projectmember-security' into 'security'
...
Fix Import/Export foreign key issue to do with project members
Cleans-up any foreign keys in `ProjectMember` - same as we do with the rest of the models when importing.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/23837 and https://gitlab.com/gitlab-org/gitlab-ce/issues/23739
See merge request !2020
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-03 16:04:18 +01:00
James Lopez
891e5f4851
Update specs to cope with new label types and priorities
...
Fixed all related specs and also changed the logic to handle edge cases. This includes exporting and exporting of group labels, which will get associated with the new group (if any) or they will become normal project labels otherwise.
Found other issues to do with not being able to import all labels at once in the beginning of the JSON - code was much simpler when we import all labels and milestones associated to a project first, then the associations will find the already created labels instead of creating them from the associations themselves.
2016-10-19 14:58:28 -02:00
Douglas Barbosa Alexandre
11d786e7da
Use try instead of ternary operator on Gitlab::ImportExport::ProjectTreeRestorer
2016-10-19 14:58:25 -02:00
James Lopez
77b7bfd463
Fix import/export labels to cope with project and group labels. Added relevant specs.
2016-10-19 14:58:25 -02:00
James Lopez
848a146fc3
Fix import test
2016-10-19 14:58:25 -02:00
Douglas Barbosa Alexandre
e036a72dca
Add Lavel#type to methods in lib/gitlab/import_export/import_export.yml
2016-10-19 14:58:25 -02:00
Rémy Coutable
67aabcc764
Merge remote-tracking branch 'dev/master'
2016-10-06 08:34:39 +02:00
Rémy Coutable
d51bb99a7e
Merge commit 'dev/security' into 'master'
...
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-10-06 08:33:11 +02:00
James Lopez
958d9f11e8
fix export project file permissions issue
2016-09-30 16:10:48 +02:00
Douwe Maan
8a866bfce3
Merge branch 'fix/id-claim-import-issue' into 'master'
...
Prevent claiming associated model IDs via import
On the import side, we should be careful not to use any IDs as part of the JSON file that could have been manipulated.
Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/20821
Things we already do (__before__ this fix):
1. Remove all primary keys
1. **Always** reassign some of the foreign keys, such as ALL project IDs and user IDs (so it would be difficult to impersonate or try to gain access to another project)
1. Ignore/reject attributes that do not exist in the model
1. If someone reassigns a foreign key `submodel_id`, and that object has another json as the submodel, the new submodel will reassign the `submodel_id` to the newly created submodel ID.
Things we should do:
1. Remove/nullify any other foreign keys that we don't reassign (checked this, and there aren't many, fortunately. In fact, I don't think much harm can be done at all - at the moment).
See merge request !1985
2016-09-30 07:31:02 +00:00
James Lopez
9e0b7c630f
updated attribute cleaner to use allowed keyword and reject attributes
2016-09-27 16:12:08 +02:00
James Lopez
4c480be39b
Prevent claiming associated model IDs via import and added relevant specs
2016-09-27 15:48:10 +02:00
James Lopez
fc548207d5
fix model order in import/export config and 1to1 relation issue. Added relevant specs.
2016-09-27 14:56:33 +02:00