Commit graph

13 commits

Author SHA1 Message Date
gfyoung
12ee2753c1 Enable even more frozen string in app/controllers
Enables frozen string for some vestigial files as
well as the following:

* app/controllers/projects/**/*.rb
* app/controllers/sherlock/**/*.rb
* app/controllers/snippets/**/*.rb
* app/controllers/users/**/*.rb

Partially addresses #47424.
2018-09-25 22:43:49 -07:00
Lin Jen-Shin
4ee08b77bc Updates from rubocop -a 2018-07-09 21:13:08 +08:00
Kamil Trzciński
c6e95b0440 Improve Ci::Runner#assign_to to return a flag whether it succeeded or not 2018-05-31 10:56:41 +02:00
Dylan Griffith
1ef9e9c2aa Inline runner_path and runners_path helpers
These were just shorthands for project_... and they will be confusing when introducing group runners so we should not have them (#10244)
2018-05-07 08:54:07 +02:00
blackst0ne
a544e46bb0 Add a rubocop rule to check if a method 'redirect_to' is used without explicitly set 'status' in 'destroy' actions of controllers 2017-06-07 09:45:16 +11:00
Lin Jen-Shin
23a3ce946a Use Ability to check pre-requisite. Change back to 403 because:
If we're using `can?` it would look weird to use 409
2016-06-29 19:04:06 +08:00
Lin Jen-Shin
b5c8d58afb Use 409 to indicate that interface might be outdated
Because invalid actions shouldn't be shown on the page.
2016-06-28 19:54:18 +08:00
Lin Jen-Shin
c866b906e6 Fix typo. It's ivar and the column was called locked 2016-06-15 17:29:07 +08:00
Lin Jen-Shin
9cf45b0586 Return the association and check it in controller instead:
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4641#note_12444891
2016-06-14 23:11:43 +08:00
Lin Jen-Shin
1b8f52d920 Avoid enabling locked runners. Give 403 in this case 2016-06-14 22:58:38 +08:00
Kamil Trzcinski
055afab5c7 Make the CI permission model simpler
This MR simplifies CI permission model:
- read_build: allows to read a list of builds, artifacts and trace
- update_build: allows to cancel and retry builds
- create_build: allows to create builds from gitlab-ci.yml (not yet implemented)
- admin_build: allows to manage triggers, runners and variables
- read_commit_status: allows to read a list of commit statuses (including the overall of builds)
- create_commit_status: allows to create a new commit status using API

Remove all extra methods to manage permission.
Made all controllers to use explicitly the new permissions.
2016-02-02 09:18:08 +01:00
Kamil Trzcinski
64bfd9d71a Remove ci_ prefix from all ci related things 2015-12-11 18:02:09 +01:00
Kamil Trzcinski
e80e3f5372 Migrate CI::Project to Project 2015-12-11 18:02:09 +01:00