Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-01-19Support notes without projectJarka Kadlecova
2016-12-15Merge branch 'jej-note-search-uses-finder' into 'security' Douwe Maan
Fix missing Note access checks in by moving Note#search to updated NoteFinder Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867 ## Which fixes are in this MR? :warning: - Potentially untested :bomb: - No test coverage :traffic_light: - Test coverage of some sort exists (a test failed when error raised) :vertical_traffic_light: - Test coverage of return value (a test failed when nil used) :white_check_mark: - Permissions check tested ### Note lookup without access check - [x] :white_check_mark: app/finders/notes_finder.rb:13 :download_code check - [x] :white_check_mark: app/finders/notes_finder.rb:19 `SnippetsFinder` - [x] :white_check_mark: app/models/note.rb:121 [`Issue#visible_to_user`] - [x] :white_check_mark: lib/gitlab/project_search_results.rb:113 - This is the only use of `app/models/note.rb:121` above, but importantly has no access checks at all. This means it leaks MR comments and snippets when those features are `team-only` in addition to the issue comments which would be fixed by `app/models/note.rb:121`. - It is only called from SearchController where `can?(current_user, :download_code, @project)` is checked, so commit comments are not leaked. ### Previous discussions - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_13_13 `: download_code` check on commit - [x] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b915c5267a63628b0bafd23d37792ae73ceae272_19_19 `SnippetsFinder` should be used - `SnippetsFinder` should check if the snippets feature is enabled -> https://gitlab.com/gitlab-org/gitlab-ce/issues/25223 ### Acceptance criteria met? - [x] Tests added for new code - [x] TODO comments removed - [x] Squashed and removed skipped tests - [x] Changelog entry - [ ] State Gitlab versions affected and issue severity in description - [ ] Create technical debt issue for NotesFinder. - Either split into `NotesFinder::ForTarget` and `NotesFinder::Search` or consider object per notable type such as `NotesFinder::OnIssue`. For the first option could create `NotesFinder::Base` which is either inherited from or which can be included in the other two. - Avoid case statement anti-pattern in this finder with use of `NotesFinder::OnCommit` etc. Consider something on the finder for this? `Model.finder(user, project)` - Move `inc_author` to the controller, and implement `related_notes` to replace `non_diff_notes`/`mr_and_commit_notes` See merge request !2035
2016-11-24Rephrase some system notes to be compatible with new system note styleDouwe Maan
2016-08-30remove Ability.abilitieshttp://jneen.net/
2016-08-30remove six, and use a Set insteadhttp://jneen.net/
2016-08-25Capitalize mentioned issue timeline notesClement Ho
2016-08-17Store discussion_id on Note for faster discussion lookup.Douwe Maan
2016-08-13Merge branch 'master' into diff-line-comment-vuejsDouwe Maan
2016-08-12Add specs for new Note and DiffNote methods.Douwe Maan
2016-08-09adds second batch of tests changed to active tensetiagonbotelho
2016-07-21Retrieve rendered HTML from cache in one requestAhmad Sherif
See #19985
2016-07-12Optimize system note visibility checking by hiding notes thatStan Hu
have been fully redacted and contain cross-project references. The previous implementation relied on Note#cross_reference_not_visible_for?, which essentially tries to render all the Markdown references in a system note and only displays the note if the user can see the referring project. But this duplicated the work that Banzai::NotesRenderer was doing already. Instead, for each note we render, we memoize the number of visible user references and use it later if it is available. Improves #19273
2016-07-04Don't garbage collect commits that have related DB records like commentsDouwe Maan
2016-06-14Project members with guest role can't access confidential issuesDouglas Barbosa Alexandre
2016-06-06Backend awardables on commentsZJ van de Weg
2016-06-03Merge branch 'master' into awardablesZ.J. van de Weg
2016-06-01Fix note validation spec failuresStan Hu
2016-06-01Merge branch 'separate-banzai-references' into 'master' Douwe Maan
Separate reference gathering from rendering This is a required step to allow batch processing when gathering references. This in turn would allow grabbing (for example) all mentioned users of an issue/merge request using a single query. cc @rspeicher @DouweM See merge request !3969
2016-06-01Refactor ParticipableYorick Peterse
There are several changes to this module: 1. The use of an explicit stack in Participable#participants 2. Proc behaviour has been changed 3. Batch permissions checking == Explicit Stack Participable#participants no longer uses recursion to process "self" and all child objects, instead it uses an Array and processes objects in breadth-first order. This allows us to for example create a single Gitlab::ReferenceExtractor instance and pass this to any Procs. Re-using a ReferenceExtractor removes the need for running potentially many SQL queries every time a Proc is called on a new object. == Proc Behaviour Changed Previously a Proc in Participable was expected to return an Array of User instances. This has been changed and instead it's now expected that a Proc modifies the Gitlab::ReferenceExtractor passed to it. The return value of the Proc is ignored. == Permissions Checking The method Participable#participants uses Ability.users_that_can_read_project to check if the returned users have access to the project of "self" _without_ running multiple SQL queries for every user.
2016-05-31Merge branch 'data_leak' into 'master' Robert Speicher
Confidential notes data leak Fixes part of https://gitlab.com/gitlab-org/gitlab-ee/issues/575 See merge request !1967
2016-05-31Confidential notes data leakValery Sizov
2016-05-30Merge branch 'master' into awardablesZJ van de Weg
2016-05-30Shut up, RuboCopRobert Speicher
:heart:
2016-05-29Minor changes in note validation specsGrzegorz Bizon
2016-05-29Update specs to carry out changes in note factoryGrzegorz Bizon
2016-05-29Add more validation tests for note modelGrzegorz Bizon
2016-05-29Update note factory to include noteable associationGrzegorz Bizon
2016-05-25Remove old tests, and use right factoriesZJ van de Weg
2016-05-18Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into awardablesFatih Acet
# Conflicts: # app/controllers/projects/merge_requests_controller.rb # app/models/note.rb # db/schema.rb # spec/models/note_spec.rb
2016-05-14Update specsDouwe Maan
2016-05-14Extract LegacyDiffNote out of NoteDouwe Maan
2016-05-11Merge branch 'master' into awardablesZeger-Jan van de Weg
2016-05-09Remove the annotate gem and delete old annotationsJeroen van Baarsen
In 8278b763d96ef10c6494409b18b7eb541463af29 the default behaviour of annotation has changes, which was causing a lot of noise in diffs. We decided in #17382 that it is better to get rid of the whole annotate gem, and instead let people look at schema.rb for the columns in a table. Fixes: #17382
2016-05-06Create table for award emojiZeger-Jan van de Weg
2016-03-14Merge branch 'rs-note-active-spec' into 'master'Robert Speicher
Add unit specs for `Note#active?` See merge request !3133
2016-03-12Add unit specs for `Note#active?`Robert Speicher
2016-03-12Disallow blank (non-null) values for a Note's `line_code` attributeRobert Speicher
It's unclear how these blank values got added, but GitLab.com had a few: ``` irb(main):002:0> Note.where("line_code IS NOT NULL AND line_code = ''").count => 439 ``` We've added a migration to convert any existing records to use a NULL value when blank, and updated Note to set blank values to nil before validation.
2016-03-11Use ILIKE/LIKE for searching notesYorick Peterse
2016-03-07Remove redundant integration testsRobert Speicher
These three tests were essentially checking that adding a note to something updated its `noteable`'s `updated_at` attribute. This is well-tested Rails behavior and we shouldn't feel the need to write an integration test to verify it. At most we should be ensuring that the association definition adds the `touch: true` option, which we now do in Note's unit test.
2016-02-20Rename Tasks to TodosDouglas Barbosa Alexandre
2016-02-20Use destroy, in case we ever have before_destroy callbacks on TaskDouglas Barbosa Alexandre
2016-02-20Create a pending task when a user is mentioned on a noteDouglas Barbosa Alexandre
2016-02-19Improve #set_award! on the Note modelZeger-Jan van de Weg
2016-02-19Emoji reponses on diffs aren't award emojiZeger-Jan van de Weg
2016-01-14Fix specs and rubocop warningsRémy Coutable
2016-01-13Add spec for Note#cross_reference_not_visible_for?Rémy Coutable
2016-01-06Add regression test.Douwe Maan
2015-12-25revert back vote buttons to issue and MR pagesValery Sizov
2015-12-24fix specValery Sizov
2015-12-11emoji aliases problemValery Sizov