Commit 1932f902 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Allow masters to create projects in groups

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 14f78d06
module NamespacesHelper module NamespacesHelper
def namespaces_options(selected = :current_user, scope = :default) 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] users = [current_user.namespace]
group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [g.human_name, g.id]} ] group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [g.human_name, g.id]} ]
......
.ui-box .ui-box
.title .title
Projects (#{projects.count}) Projects (#{projects.count})
- if can? current_user, :manage_group, @group - if can? current_user, :create_projects, @group
%span.pull-right %span.pull-right
= link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do = link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do
%i.icon-plus %i.icon-plus
......
...@@ -40,7 +40,7 @@ If a user is a GitLab administrator they receive all permissions. ...@@ -40,7 +40,7 @@ If a user is a GitLab administrator they receive all permissions.
|------|-----|--------|---------|------|-----| |------|-----|--------|---------|------|-----|
|Browse group|✓|✓|✓|✓|✓| |Browse group|✓|✓|✓|✓|✓|
|Edit group|||||✓| |Edit group|||||✓|
|Create project in group|||||✓| |Create project in group|||||✓|
|Manage group members|||||✓| |Manage group members|||||✓|
|Remove group|||||✓| |Remove group|||||✓|
......
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