Ahmad Sherif
0c22698bd4
Add API endpoints for un/subscribing from/to a label
...
Closes #15638
2016-05-12 22:48:09 +02:00
Stan Hu
e99cf05875
Use ActionDispatch Remote IP for Akismet checking
...
Previously all remote IPs appeared at 127.0.0.1, which made Akismet
not very useful. Using the ActionDispatch Remote IP (http://api.rubyonrails.org/classes/ActionDispatch/RemoteIp.html )
should provide more reliable results.
Closes #16629
2016-04-27 22:12:55 -07:00
Michael Greene
28a7fe25fd
Allow back dating issues on update
2016-04-13 12:04:09 -05:00
Robert Schilling
a9200d93d3
Ensure that issues and merge requests are found
2016-04-13 17:15:42 +02:00
Robert Schilling
fa3009095f
Make subscription API more RESTful
2016-04-13 13:52:13 +02:00
Robert Schilling
f875189b39
API: Ability to subscribe and unsubscribe from a merge request
2016-04-13 13:45:01 +02:00
Robert Schilling
bd0be13f5b
API: Ability to subscribe and unsubscribe from an issue
2016-04-13 13:45:00 +02:00
Robert Schilling
2b036025d6
Update tests for moving issues via API
2016-04-13 11:31:50 +02:00
Robert Schilling
482f67edb4
API: Ability to move an issue
2016-04-13 11:23:42 +02:00
Robert Schilling
fb2fde9d62
API: Expose subscribed? on issues
2016-04-08 15:53:04 +02:00
Zeger-Jan van de Weg
473b261261
Back dating of issues when creating throught the API
2016-03-28 16:45:36 +02:00
Zeger-Jan van de Weg
3b088fc5b5
Minor improvements on IssuableActions
2016-03-21 16:59:35 +01:00
Zeger-Jan van de Weg
1d77822816
minor improvements and fixed specs
2016-03-19 21:24:05 +01:00
Zeger-Jan van de Weg
7342a4566c
Dry destroy action on issuables
2016-03-19 21:24:05 +01:00
Zeger-Jan van de Weg
212e83bab3
Soft delete issuables
2016-03-19 21:23:03 +01:00
Douglas Barbosa Alexandre
e4f1c001e6
Restrict access to confidential issues through API
2016-03-17 20:55:59 -03:00
Douglas Barbosa Alexandre
a2bbf00477
Refactor spam filtering on issues API
2016-02-02 11:25:44 -02:00
Stan Hu and Douglas Barbosa Alexandre
d20e75a8d8
Support Akismet spam checking for creation of issues via API
...
Currently any spam detected by Akismet by non-members via API will be logged
in a separate table in the admin page.
Closes #5612
2016-02-02 11:25:44 -02:00
Dmitriy Zaporozhets
9f166a8649
Merge branch 'rename-abilities' into 'master'
...
Rename abilities to correspond contoller/model action names
write_ was renamed to create_
modify_ was renamed to update_
So now in update action we have next code
```
def create
can?(current_user, :create_issue, @issue)
end
def update
can?(current_user, :update_issue, @issue)
end
```
See merge request !896
2015-06-26 16:39:17 +00:00
Dmitriy Zaporozhets
58ceb8e950
Only people who can manage issue can assign labels to it
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-06-26 16:02:57 +02:00
Dmitriy Zaporozhets
342d553709
Rename abilities to correspond contoller/model action names
...
write_ was renamed to create_
modify_ was renamed to update_
So now in update action we have next code
def create
can?(current_user, :create_issue, @issue)
end
def update
can?(current_user, :update_issue, @issue)
end
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2015-06-26 15:55:56 +02:00
jubianchi
2c544d43c8
Query issues, merge requests and milestones with their IID through API
2015-05-02 10:44:52 +02:00
Dmitriy Zaporozhets
bdfb349ff7
Refactor and improve sorting objects in API for projects, issues and merge requests
2015-02-05 22:00:54 -08:00
Dmitriy Zaporozhets
62ed1c537e
Explicitly define ordering in models using default_scope
2015-02-05 14:20:55 -08:00
jubianchi
f258a59ef6
Filters issues by milestone via API
2014-09-26 22:03:37 +02:00
jubianchi
998cd3cb63
Improve error reporting on users API
...
* users (#6878 , #3526 , #4209 ): Validation error messages are now exposed through 400 responses, 409 response are sent in case of duplicate email or username
* MRs (#5335 ): 409 responses are sent in case of duplicate merge request (source/target branches), 422 responses are sent when submiting MR fo/from unrelated forks
* issues
* labels
* projects
2014-09-16 01:25:24 +02:00
Dmitriy Zaporozhets
66516da3c1
Explicit issues order in API. Fixes tests for mysql. Again :)
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2014-09-04 17:15:08 +03:00
jubianchi and jubianchi
0ac4a933ff
Filters issues by labels via API
2014-09-04 14:41:31 +02:00
Dmitriy Zaporozhets
93f15a4953
Explicit order of issues in API. Fixes specs for mysql db
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2014-09-03 22:57:32 +03:00
Dmitriy Zaporozhets
20c2e90222
Refactor finders. Prevent circular dependency error
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2014-09-02 15:28:27 +03:00
jubianchi and jubianchi
4fdd21685c
Filters issues by state via API
2014-09-01 13:51:40 +02:00
jubianchi
7ad93ab250
Improve labels validation and expose error messages
2014-08-20 12:09:19 +02:00
Robert Schilling
cbc90565b5
Do label validation for issues/merge requests API
2014-08-14 10:17:52 +02:00
Dmitriy Zaporozhets
d9d8d3b799
Fix old api compatibility and tests
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2014-07-30 17:17:29 +03:00
Dmitriy Zaporozhets
c4e81ed9de
Move update issue code to separate service
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2014-04-02 13:54:41 +03:00
Dmitriy Zaporozhets
cfd9fd30d6
Move code for issue creation to service.
...
The goal of suych refactoring is to get rid of observers.
Its much easier to test and code when object creation and all other
related actions done in one class instead of splited across observers,
callbacks etc.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com >
2014-04-02 13:38:35 +03:00
Angus MacArthur
aefe2e952f
Fixing unsafe use of Thread.current variable :current_user
2013-10-16 01:20:53 -04:00
Dmitriy Zaporozhets
993af5d0d2
cattr_accessor is not threadsafe!
2013-06-11 18:15:18 +03:00
Dmitriy Zaporozhets
a4e671dc31
Fix wrong documentation for issue close api. Fixes #3548
2013-06-06 11:31:40 +03:00
Dmitriy Zaporozhets
634cbd7138
Refactor API classes. So api classes like Gitlab::Issues become API::Issues
2013-05-14 15:33:31 +03:00
Sebastian Ziebell
7499f65014
API: extracted helper method to validate required parameters, code clean up
...
Added a helper method to check if required parameters are given in an API call. Can be used
to return a `400 Bad Request` return code if a required attribute is missing.
Code clean up and fixed tests.
2013-02-27 17:50:30 +01:00
Sebastian Ziebell
e96d77d3db
API: issues documentation and API functions updated
...
The issues documentation is updated with infos to status codes and the deprecated `DELETE` function and
how to close an issue. A few more tests added to check status codes of API functions.
2013-02-27 14:36:20 +01:00
Andrew8xx8
1644117a1a
Issue uses StateMachine now
2013-02-18 14:43:50 +04:00
Dmitriy Zaporozhets
67896ea9a2
Fixed missing current user for issue observer
2013-01-02 20:25:25 +02:00
Riyad Preukschas
8f01190eb5
Remove all references tp the project code parameter from the API
2012-12-21 18:47:04 +01:00
Alex Denisov
b896880eb4
Method name changed
2012-09-16 20:08:57 +03:00
Alex Denisov
549c4c2202
API attributes refactored
2012-09-16 19:51:04 +03:00
Alex Denisov
915dac0055
Error throwing moved to api_helper
2012-09-10 10:41:46 +03:00
randx
b565f33472
Auth for API
2012-09-10 09:06:11 +03:00
Nihad Abbasov
76e4d94d43
add pagination to API
2012-09-03 04:46:29 -07:00