Commit graph

10 commits

Author SHA1 Message Date
Robert Speicher
ccbbc1000d Merge branch 'resolve-lib-differences' into 'master'
Resolve CE to EE differences in the lib/api directory

See merge request gitlab-org/gitlab-ce!25430
2019-03-12 17:03:50 +00:00
Igor Drozdov
5169dafccf Forbid creating discussions for users with restricted access 2019-03-04 18:37:08 +00:00
Yorick Peterse
654c4dd922
Refactor API noteable types constants
This replaces API::Notes::NOTEABLE_TYPES and
API::Discussions::NOTEABLE_TYPES with class methods defined in a
separate helper modules. This allows EE to extend the list of noteable
types, without having to modify the constant in-place. We can't define
these methods directly in the API classes, as they would be used before
we're able to extend them in EE.
2019-03-04 17:44:56 +01:00
gfyoung
3836d69119 Enable frozen string in lib/api and lib/backup
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
2018-09-29 21:04:50 -07:00
Sean McGivern
aff7dccc1f Use policies to determine if attributes can be set in the API
This is more idiomatic than checking membership explicitly.
2018-08-22 14:17:29 +01:00
Florent Dubois
b63ed7cff6 Allow date parameters on Issues and Notes API for group owners
- Allow `created_at` and `updated_at` parameters on Issues API
- Allow `created_at` on Issue Notes API

Closes gitlab-org/gitlab-ce#40059
2018-08-22 12:16:48 +01:00
Kia Mei Somabes
37af75a2e0 Resolve "do not set updated_at when creating note" 2018-07-12 09:26:09 +00:00
Jan Provaznik
7a76caa5a8 Merge request and commit discussions API 2018-05-01 12:39:44 +00:00
Lin Jen-Shin
ab286656b2 Resolve "Namespace factory is problematic" 2018-04-23 15:48:26 +00:00
Jan Provaznik
dcdfa04b32 Add discussion API
* adds basic discussions API for issues and snippets
* reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
2018-03-07 12:27:50 +01:00