Commit c8a4ec36 authored by Simon Knox's avatar Simon Knox

Merge branch 'issue_928_group_boards' of gitlab.com:gitlab-org/gitlab-ee into...

Merge branch 'issue_928_group_boards' of gitlab.com:gitlab-org/gitlab-ee into issue_928_group_boards
parents 2f4e352d 22439322
......@@ -7,6 +7,7 @@ module Boards
before_action :authorize_read_issue, only: [:index]
before_action :authorize_create_issue, only: [:create]
before_action :authorize_update_issue, only: [:update]
skip_before_action :authenticate_user!, only: [:index]
def index
issues = Boards::Issues::ListService.new(board_parent, current_user, filter_params).execute
......
......@@ -5,6 +5,7 @@ module Boards
before_action :authorize_admin_list, only: [:create, :update, :destroy, :generate]
before_action :authorize_read_list, only: [:index]
skip_before_action :authenticate_user!, only: [:index]
def index
lists = Boards::Lists::ListService.new(board.parent, current_user).execute(board)
......
......@@ -24,9 +24,18 @@ class GroupPolicy < BasePolicy
with_options scope: :subject, score: 0
condition(:request_access_enabled) { @subject.request_access_enabled }
rule { public_group } .enable :read_group
rule { public_group }.policy do
enable :read_group
enable :read_list
end
rule { logged_in_viewable }.enable :read_group
rule { guest } .enable :read_group
rule { guest }.policy do
enable :read_group
enable :read_list
end
rule { admin } .enable :read_group
rule { has_projects } .enable :read_group
......
module Boards
module Lists
class CreateService < BaseService
class CreateService < Boards::BaseService
prepend EE::Boards::Lists::CreateService
def execute(board)
......
module Boards
module Lists
class DestroyService < BaseService
class DestroyService < Boards::BaseService
def execute(list)
return false unless list.destroyable?
......
module Boards
module Lists
class GenerateService < BaseService
class GenerateService < Boards::BaseService
def execute(board)
return false unless board.lists.movable.empty?
......
module Boards
module Lists
class ListService < BaseService
class ListService < Boards::BaseService
def execute(board)
board.lists.create(list_type: :backlog) unless board.lists.backlog.exists?
......
module Boards
module Lists
class MoveService < BaseService
class MoveService < Boards::BaseService
def execute(list)
@board = list.board
@old_position = list.position
......
......@@ -99,7 +99,7 @@ describe Boards::Issues::MoveService, services: true do
issue.move_to_end && issue.save!
end
params.merge!(move_after_iid: issue1.iid, move_before_iid: issue2.iid)
params.merge!(move_after_id: issue1.id, move_before_id: issue2.id)
described_class.new(group, user, params).execute(issue)
......
......@@ -80,7 +80,7 @@ describe Issues::UpdateService, :mailer do
issue.save
end
opts[:move_between_iids] = [issue1.iid, issue2.iid]
opts[:move_between_ids] = [issue1.id, issue2.id]
update_issue(opts)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment