Commit 1932f902d51d17ff4eb4ebfd15a16fac55cf9eb4

Authored by Dmitriy Zaporozhets
1 parent 14f78d06

Allow masters to create projects in groups

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/helpers/namespaces_helper.rb
1 1 module NamespacesHelper
2 2 def namespaces_options(selected = :current_user, scope = :default)
3   - groups = current_user.owned_groups
  3 + groups = current_user.owned_groups + current_user.masters_groups
4 4 users = [current_user.namespace]
5 5  
6 6 group_opts = ["Groups", groups.sort_by(&:human_name).map {|g| [g.human_name, g.id]} ]
... ...
app/views/groups/_projects.html.haml
1 1 .ui-box
2 2 .title
3 3 Projects (#{projects.count})
4   - - if can? current_user, :manage_group, @group
  4 + - if can? current_user, :create_projects, @group
5 5 %span.pull-right
6 6 = link_to new_project_path(namespace_id: @group.id), class: "btn btn-new" do
7 7 %i.icon-plus
... ...
doc/permissions/permissions.md
... ... @@ -40,7 +40,7 @@ If a user is a GitLab administrator they receive all permissions.
40 40 |------|-----|--------|---------|------|-----|
41 41 |Browse group|✓|✓|✓|✓|✓|
42 42 |Edit group|||||✓|
43   -|Create project in group|||||✓|
  43 +|Create project in group|||||✓|
44 44 |Manage group members|||||✓|
45 45 |Remove group|||||✓|
46 46  
... ...