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 | 240 | can_manage = group_abilities(user, group).include?(:manage_group) |
241 | 241 | if can_manage && (user != target_user) |
242 | 242 | rules << :modify |
243 | + rules << :destroy | |
243 | 244 | end |
244 | 245 | if !group.last_owner?(user) && (can_manage || (user == target_user)) |
245 | 246 | rules << :destroy | ... | ... |
features/group.feature
... | ... | @@ -74,7 +74,7 @@ Feature: Groups |
74 | 74 | When I visit group "Owned" members page |
75 | 75 | Then I should see user "John Doe" in team list |
76 | 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 | 79 | @javascript |
80 | 80 | Scenario: Guest should be able to remove himself from group | ... | ... |
lib/gitlab/regex.rb
... | ... | @@ -7,7 +7,7 @@ module Gitlab |
7 | 7 | end |
8 | 8 | |
9 | 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 | 11 | end |
12 | 12 | |
13 | 13 | def name_regex |
... | ... | @@ -49,7 +49,7 @@ module Gitlab |
49 | 49 | protected |
50 | 50 | |
51 | 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 | 53 | end |
54 | 54 | end |
55 | 55 | end | ... | ... |