mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 01:26:08 +10:00
Merge branch 'master' of github.com:gitlabhq/gitlabhq
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user