Commit f16de8ac8c67b5dcd251cc202b261f6f12e9f56e
Exists in
spb-stable
and in
3 other branches
Merge branch 'master' of github.com:gitlabhq/gitlabhq
Showing
3 changed files
with
4 additions
and
3 deletions
Show diff stats
app/models/ability.rb
@@ -240,6 +240,7 @@ class Ability | @@ -240,6 +240,7 @@ class Ability | ||
240 | can_manage = group_abilities(user, group).include?(:manage_group) | 240 | can_manage = group_abilities(user, group).include?(:manage_group) |
241 | if can_manage && (user != target_user) | 241 | if can_manage && (user != target_user) |
242 | rules << :modify | 242 | rules << :modify |
243 | + rules << :destroy | ||
243 | end | 244 | end |
244 | if !group.last_owner?(user) && (can_manage || (user == target_user)) | 245 | if !group.last_owner?(user) && (can_manage || (user == target_user)) |
245 | rules << :destroy | 246 | rules << :destroy |
features/group.feature
@@ -74,7 +74,7 @@ Feature: Groups | @@ -74,7 +74,7 @@ Feature: Groups | ||
74 | When I visit group "Owned" members page | 74 | When I visit group "Owned" members page |
75 | Then I should see user "John Doe" in team list | 75 | Then I should see user "John Doe" in team list |
76 | Then I should see user "Mary Jane" in team list | 76 | Then I should see user "Mary Jane" in team list |
77 | - Then I should not see the "Remove User From Group" button for "Mary Jane" | 77 | + Then I should not see the "Remove User From Group" button for "John Doe" |
78 | 78 | ||
79 | @javascript | 79 | @javascript |
80 | Scenario: Guest should be able to remove himself from group | 80 | Scenario: Guest should be able to remove himself from group |
lib/gitlab/regex.rb
@@ -7,7 +7,7 @@ module Gitlab | @@ -7,7 +7,7 @@ module Gitlab | ||
7 | end | 7 | end |
8 | 8 | ||
9 | def project_name_regex | 9 | def project_name_regex |
10 | - /\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/ | 10 | + /\A[a-zA-Z0-9_][a-zA-Z0-9_\-\. ]*\z/ |
11 | end | 11 | end |
12 | 12 | ||
13 | def name_regex | 13 | def name_regex |
@@ -49,7 +49,7 @@ module Gitlab | @@ -49,7 +49,7 @@ module Gitlab | ||
49 | protected | 49 | protected |
50 | 50 | ||
51 | def default_regex | 51 | def default_regex |
52 | - /\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ | 52 | + /\A[.?]?[a-zA-Z0-9_][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ |
53 | end | 53 | end |
54 | end | 54 | end |
55 | end | 55 | end |