-
- Downloads
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.
Showing
- app/controllers/ci/application_controller.rb 1 addition, 1 deletionapp/controllers/ci/application_controller.rb
- app/controllers/projects/artifacts_controller.rb 1 addition, 11 deletionsapp/controllers/projects/artifacts_controller.rb
- app/controllers/projects/builds_controller.rb 2 additions, 7 deletionsapp/controllers/projects/builds_controller.rb
- app/controllers/projects/commit_controller.rb 3 additions, 9 deletionsapp/controllers/projects/commit_controller.rb
- app/controllers/projects/runner_projects_controller.rb 1 addition, 1 deletionapp/controllers/projects/runner_projects_controller.rb
- app/controllers/projects/runners_controller.rb 1 addition, 1 deletionapp/controllers/projects/runners_controller.rb
- app/controllers/projects/triggers_controller.rb 1 addition, 1 deletionapp/controllers/projects/triggers_controller.rb
- app/controllers/projects/variables_controller.rb 1 addition, 1 deletionapp/controllers/projects/variables_controller.rb
- app/helpers/projects_helper.rb 1 addition, 1 deletionapp/helpers/projects_helper.rb
- app/models/ability.rb 26 additions, 8 deletionsapp/models/ability.rb
- app/views/admin/builds/_build.html.haml 3 additions, 3 deletionsapp/views/admin/builds/_build.html.haml
- app/views/projects/builds/index.html.haml 1 addition, 1 deletionapp/views/projects/builds/index.html.haml
- app/views/projects/builds/show.html.haml 2 additions, 3 deletionsapp/views/projects/builds/show.html.haml
- app/views/projects/commit/_builds.html.haml 1 addition, 1 deletionapp/views/projects/commit/_builds.html.haml
- app/views/projects/commit_statuses/_commit_status.html.haml 3 additions, 3 deletionsapp/views/projects/commit_statuses/_commit_status.html.haml
- lib/api/builds.rb 20 additions, 9 deletionslib/api/builds.rb
- lib/api/commit_statuses.rb 1 addition, 1 deletionlib/api/commit_statuses.rb
- lib/api/triggers.rb 4 additions, 4 deletionslib/api/triggers.rb
- lib/api/variables.rb 1 addition, 1 deletionlib/api/variables.rb
- spec/requests/api/builds_spec.rb 4 additions, 4 deletionsspec/requests/api/builds_spec.rb
Please register or sign in to comment