From 1932f902d51d17ff4eb4ebfd15a16fac55cf9eb4 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> Date: Wed, 28 May 2014 19:04:42 +0300 Subject: [PATCH] Allow masters to create projects in groups Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> --- app/helpers/namespaces_helper.rb | 2 +- app/views/groups/_projects.html.haml | 2 +- doc/permissions/permissions.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/helpers/namespaces_helper.rb b/app/helpers/namespaces_helper.rb index c363c7ffd74..bf25dce2301 100644 --- a/app/helpers/namespaces_helper.rb +++ b/app/helpers/namespaces_helper.rb @@ -1,6 +1,6 @@ module NamespacesHelper def namespaces_options(selected = :current_user, scope = :default) - groups = current_user.owned_groups + groups = current_user.owned_groups + current_user.masters_groups users = [current_user.namespace] group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [g.human_name, g.id]} ] diff --git a/app/views/groups/_projects.html.haml b/app/views/groups/_projects.html.haml index 41f8cb9da40..4ded28058ed 100644 --- a/app/views/groups/_projects.html.haml +++ b/app/views/groups/_projects.html.haml @@ -1,7 +1,7 @@ .ui-box .title Projects (#{projects.count}) - - if can? current_user, :manage_group, @group + - if can? current_user, :create_projects, @group %span.pull-right = link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do %i.icon-plus diff --git a/doc/permissions/permissions.md b/doc/permissions/permissions.md index 840bb90163b..95b47a86129 100644 --- a/doc/permissions/permissions.md +++ b/doc/permissions/permissions.md @@ -40,7 +40,7 @@ If a user is a GitLab administrator they receive all permissions. |------|-----|--------|---------|------|-----| |Browse group|✓|✓|✓|✓|✓| |Edit group|||||✓| -|Create project in group|||||✓| +|Create project in group||||✓|✓| |Manage group members|||||✓| |Remove group|||||✓| -- 2.30.9