Commit Graph

108 Commits

Author SHA1 Message Date
Sean McGivern 4646d453b3 Merge branch 'milestone_start_date' into 'master'
Add a starting date to milestones

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/23704

See merge request !7484
2016-11-23 13:23:13 +00:00
Valery Sizov 3789cfe056 Add a starting date to milestones 2016-11-23 13:41:04 +02:00
Ahmad Sherif 747959a832 Update ProjectTeam#max_member_access_for_user_ids to use project authorizations 2016-11-23 12:59:13 +02:00
Sean McGivern b98193c55e Merge branch 'issue_5541' into 'master'
Allow to block JIRA events for commits and merge requests

implements #5541 

See merge request !7469
2016-11-21 11:07:46 +00:00
Felipe Artur d399e1ae2b Allow enabling and disabling commit and MR events for JIRA 2016-11-18 15:17:51 -02:00
Kamil Trzcinski 1db1896ed2 Rename mattermost_command to mattermost_slash_commands 2016-11-18 17:27:14 +01:00
Z.J. van de Weg f749fb7fe0 Improve style, add more tests 2016-11-18 11:38:54 +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
Kamil Trzcinski d8aed6a27b Fix optimistic locking 2016-10-26 11:37:23 +02: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
James Lopez 723e576782 fix rubocop warning 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
Douglas Barbosa Alexandre e00c739f97 Add Label attributes: type, and group_id to safe model attributes 2016-10-19 14:58:25 -02:00
Kamil Trzciński 2f7e1c0ead Merge branch 'pipeline-emails' into 'master'
Add a new pipeline email service

## What does this MR do?

Add a new pipeline email service

## What are the relevant issue numbers?

Closes #3976 

## Remaining tasks

* [x] Preserve `&middot;` and `&nbsp;`
* [x] Use XHTML 1.0
* [ ] Use the same layout (`app/views/layouts/notify.html.haml`)
* [ ] Digest or not (assets or public)
* [x] A similar email for succeeded pipeline
* [x] Plain text versions for both emails

## Screenshots (if relevant)

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/6019#note_16594345

## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md)
- [ ] API support added
- Tests
  - [x] `PipelinesEmailService`
  - [x] `SendPipelineNotificationService`

See merge request !6019
2016-10-18 16:56:13 +00:00
Felipe Artur da07c2e4d3 Add visibility level to project repository 2016-10-17 18:12:18 -02:00
Lin Jen-Shin dc1d269f67 Merge remote-tracking branch 'upstream/master' into pipeline-emails
* upstream/master: (237 commits)
  Grapify boards API
  Add test, fix merge error
  Use local assigns to get the dropdown title
  Updated issuable dropdown titles
  Added safety check for formatted values
  Minor style improvement
  Fixed conflict and corrected teaspoon test
  Rename method in test
  Moved ci_status environments logic to new action ci_envrionments_status and set up frontend polling
  Refactor ci_status on MergeRequestController
  Fix indenting error in HAML
  Show what time ago a MR was deployed
  Fixed missing links
  Fixed missing links
  Refactor merge requests revisions
  Add link to update docs for source installations
  Grapify todos API
  Link to review apps example from docs
  fix grafana_configuration.md move link
  Do not run before_script, artifacts, cache in trigger_docs job
  ...
2016-10-14 11:31:10 +00:00
Douglas Barbosa Alexandre 81c253ded1 Add Project#boards to import/export configuration file 2016-10-11 11:39:05 -03:00
Lin Jen-Shin 94611607e5 Merge remote-tracking branch 'upstream/master' into pipeline-emails
* upstream/master: (292 commits)
  Deletes extra empty line breaking the build
  Optimize the `award_user_list` helper spec
  Fix typo and add he MWBS accronym for "Merge When Build Succeeds"
  Added missing content and improved layout
  ExpireBuildArtifactsWorker query builds table without ordering enqueuing one job per build to cleanup
  Improve the contribution and MR review guide
  Updates test in order to look for link
  Make projects API docs match parameter style
  Fix Event#reset_project_activity updates
  Update user whitelist reject message
  Call ensure_secret_token! in secret token test's before block since it would be called in an initializer.
  Add a CHANGELOG for CacheMarkdownField
  Enable CacheMarkdownField for the remaining models
  Make search results use the markdown cache columns, treating them consistently
  Use CacheMarkdownField for notes
  Add markdown cache columns to the database, but don't use them yet
  Update issue board spec
  Link to Registry docs from project settings
  Truncate long labels with ellipsis in labels page
  Improve issue load time performance by avoiding ORDER BY in find_by call
  ...
2016-10-08 07:51:07 +00:00
Nick Thomas e94cd6fdfe Add markdown cache columns to the database, but don't use them yet
This commit adds a number of _html columns and, with the exception of Note,
starts updating them whenever the content of their partner fields changes.

Note has a collision with the note_html attr_accessor; that will be fixed later

A background worker for clearing these cache columns is also introduced - use
`rake cache:clear` to set it off. You can clear the database or Redis caches
separately by running `rake cache:clear:db` or `rake cache:clear:redis`,
respectively.
2016-10-07 02:54:25 +01:00
Rémy Coutable 67aabcc764 Merge remote-tracking branch 'dev/master' 2016-10-06 08:34:39 +02:00
Lin Jen-Shin 0cc3fc5627 Add pipeline_email_service. Fixes:
https://gitlab.com/gitlab-org/gitlab-ce/builds/4710913
2016-10-04 04:16:14 +08:00
Robert Speicher 4a191c83d1 Enable Lint/StringConversionInInterpolation cop and autocorrect offenses 2016-10-03 16:09:57 +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 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
James Lopez a5b9e1c260 added more specs 2016-09-26 09:49:05 +02:00
James Lopez a9f1e972ec Fixes issue with rails reserved keyword type exporting/importing services. Also fixed CustomIssueTrackerService title setter and added relevant specs. 2016-09-26 09:49:05 +02:00
James Lopez ad62a25e0f fix import/export security specs after merge 2016-09-21 15:47:11 -05:00
James Lopez ce48a595b0 fixing security specs after merge 2016-09-21 14:36:28 +02:00
Dmitriy Zaporozhets c2a7e7b8ac Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce 2016-09-21 12:22:02 +03:00
James Lopez e74b7d665b squashed - Fix DB exceptions raised importing some specific projects.
Better import of labels, milestones and protected branches. Updated relevant specs.
Loose pipeline validation on importing, so it does not fail when there are missing fields, which are not validated at DB level. Also, updated spec with relevant test.
2016-09-19 09:18:37 +02:00
James Lopez 37fbb15a29 refactored some stuff and added new models / attributes after rebase 2016-09-09 14:56:10 +02:00
James Lopez 0f15e971fc more spec refactoring based on feedback 2016-09-09 14:56:10 +02:00
James Lopez 1631ceff19 fix attributes missing in spec after rebase with master 2016-09-09 14:56:10 +02:00
James Lopez e2827250c3 remove extra line 2016-09-09 14:56:10 +02:00
James Lopez 668ebfcaae fix wording 2016-09-09 14:56:10 +02:00
James Lopez 621b4eaf22 fixing a couple of bugs and lots of refactoring of the export file spec 2016-09-09 14:56:10 +02:00
James Lopez 13a977475a add model configuration spec to check for new models. Also refactored attribute_configuration spec 2016-09-09 14:56:10 +02:00
James Lopez 8ca963bd96 more refactoring of the specs 2016-09-09 14:56:10 +02:00
James Lopez 7323d30f44 refactored specs based on feedback 2016-09-09 14:56:10 +02:00
James Lopez c71ed62910 fixed failing spec 2016-09-09 14:56:10 +02:00
James Lopez ad14944be7 fix specs so they work in EE straight away 2016-09-09 14:56:10 +02:00
James Lopez ff1d6477da Export integration test and attribute change spec - squashed
Export file integration test that checks for sensitive info.
Also added spec to check new added attributes to models that
can be exported.
2016-09-09 14:56:10 +02:00
Felipe Artur 892dea6771 Project tools visibility level 2016-09-01 11:47:59 -03:00
James Lopez efab1677a7 Fix attribute inclusion in import/export config ignored in some cases 2016-08-11 12:49:07 +02:00
James Lopez f8e8547980 fix MR source project assignment 2016-08-09 11:03:02 +02:00
Robert Speicher 900c67bfb9 Merge branch 'rubocop/enable-more-cops-for-empty-lines' into 'master'
Enable some Rubocop cops related to new lines

## What does this MR do?

This MR enabled two additional Rubocop cops:

Keeps track of empty lines around block bodies.  
`Style/EmptyLinesAroundBlockBody`

Keeps track of empty lines around method bodies.  
` Style/EmptyLinesAroundMethodBody`

See merge request !5637
2016-08-08 23:31:00 +00:00
James Lopez f04e9dad47 Support pending invitation project members importing projects 2016-08-08 17:25:17 +02:00
James Lopez f87eb25020 Fix Import/Export error checking versions 2016-08-03 13:00:34 +02:00