diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-11 11:29:18 +0200 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-03-11 11:29:18 +0200 |
| commit | f16de8ac8c67b5dcd251cc202b261f6f12e9f56e (patch) | |
| tree | 86ba8d24548d99d9f49f24f154c522fe9bde3f95 | |
| parent | 767f7d9ae7eb29d5feaa65863a8948ca60d3825f (diff) | |
| parent | ae68a66a98337201ab2f00a61d8960699acaa349 (diff) | |
| download | gitlab-ce-f16de8ac8c67b5dcd251cc202b261f6f12e9f56e.tar.gz | |
Merge branch 'master' of github.com:gitlabhq/gitlabhq
| -rw-r--r-- | app/models/ability.rb | 1 | ||||
| -rw-r--r-- | features/group.feature | 2 | ||||
| -rw-r--r-- | lib/gitlab/regex.rb | 4 |
3 files changed, 4 insertions, 3 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index 69ada753d02..1afe8a4638f 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -240,6 +240,7 @@ class Ability can_manage = group_abilities(user, group).include?(:manage_group) if can_manage && (user != target_user) rules << :modify + rules << :destroy end if !group.last_owner?(user) && (can_manage || (user == target_user)) rules << :destroy diff --git a/features/group.feature b/features/group.feature index 71282fb75ba..4e11bcba939 100644 --- a/features/group.feature +++ b/features/group.feature @@ -74,7 +74,7 @@ Feature: Groups When I visit group "Owned" members page Then I should see user "John Doe" in team list Then I should see user "Mary Jane" in team list - Then I should not see the "Remove User From Group" button for "Mary Jane" + Then I should not see the "Remove User From Group" button for "John Doe" @javascript Scenario: Guest should be able to remove himself from group diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index d18fc8bf2ce..e932b64f4f0 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -7,7 +7,7 @@ module Gitlab end def project_name_regex - /\A[a-zA-Z0-9][a-zA-Z0-9_\-\. ]*\z/ + /\A[a-zA-Z0-9_][a-zA-Z0-9_\-\. ]*\z/ end def name_regex @@ -49,7 +49,7 @@ module Gitlab protected def default_regex - /\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ + /\A[.?]?[a-zA-Z0-9_][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ end end end |
