Skip to content

Port policies to EE

Robert Speicher requested to merge rs-port-ability-refactor into master

Ports https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5796 to EE, maintaining EE-only differences.

Assuming this all works, I think we should put this block in CE as well just to prevent future conflicts:

    # EE-only
    if defined?(License) && License.block_changes?
      cannot! :create_issue
      cannot! :create_merge_request
      cannot! :push_code
      cannot! :push_code_to_protected_branches
    end

In addition to cherry-picking the gitlab-org/gitlab-ce@e71cd7a300017cf85e16de3b1c68fdb25c3a4b4d commit, which is the merge of the Policy refactor itself, I had to cherry-pick gitlab-org/gitlab-ce@6686084c6502f10fd7e6b8963ab52526cb6831bf because it added the Project#has_wiki? method that specs depended on.

Merge request reports

Loading