Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
63cfe86e
Commit
63cfe86e
authored
Dec 18, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ce-to-ee' into 'master'
Merge CE to EE and fix tests See merge request !83
parents
5335b7f6
be84510c
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
19 deletions
+30
-19
CHANGELOG
CHANGELOG
+0
-1
app/helpers/group_members_helper.rb
app/helpers/group_members_helper.rb
+2
-1
app/models/project_services/jenkins_service.rb
app/models/project_services/jenkins_service.rb
+1
-1
app/views/projects/tree/_tree_header.html.haml
app/views/projects/tree/_tree_header.html.haml
+10
-2
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+1
-1
lib/api/entities.rb
lib/api/entities.rb
+2
-2
spec/lib/gitlab/ldap/access_spec.rb
spec/lib/gitlab/ldap/access_spec.rb
+14
-11
No files found.
CHANGELOG
View file @
63cfe86e
...
@@ -6,7 +6,6 @@ v 8.3.0 (unreleased)
...
@@ -6,7 +6,6 @@ v 8.3.0 (unreleased)
- Add open_issues_count to project API (Stan Hu)
- Add open_issues_count to project API (Stan Hu)
- Expand character set of usernames created by Omniauth (Corey Hinshaw)
- Expand character set of usernames created by Omniauth (Corey Hinshaw)
- Add button to automatically merge a merge request when the build succeeds (Zeger-Jan van de Weg)
- Add button to automatically merge a merge request when the build succeeds (Zeger-Jan van de Weg)
- Merge when build succeeds (Zeger-Jan van de Weg)
- Provide better diagnostic message upon project creation errors (Stan Hu)
- Provide better diagnostic message upon project creation errors (Stan Hu)
- Bump devise to 3.5.3 to fix reset token expiring after account creation (Stan Hu)
- Bump devise to 3.5.3 to fix reset token expiring after account creation (Stan Hu)
- Bump gollum-lib to 4.1.0 (Stan Hu)
- Bump gollum-lib to 4.1.0 (Stan Hu)
...
...
app/helpers/group_members_helper.rb
View file @
63cfe86e
module
GroupMembersHelper
module
GroupMembersHelper
def
clear_ldap_permission_cache_message
def
clear_ldap_permission_cache_message
markdown
(
<<-
EOT
.
strip_heredoc
markdown
(
<<-
EOT
.
strip_heredoc
Be careful, all members of this group (except you) will have their
Be careful, all members of this group (except you) will have their
**access level temporarily downgraded** to `Guest`. The next time that a group member
**access level temporarily downgraded** to `Guest`. The next time that a group member
signs in to GitLab (or after one hour, whichever occurs first) their access level will
signs in to GitLab (or after one hour, whichever occurs first) their access level will
...
...
app/models/project_services/jenkins_service.rb
View file @
63cfe86e
...
@@ -67,7 +67,7 @@ class JenkinsService < CiService
...
@@ -67,7 +67,7 @@ class JenkinsService < CiService
def
build_page
(
sha
,
ref
=
nil
)
def
build_page
(
sha
,
ref
=
nil
)
if
multiproject_enabled?
&&
ref
.
present?
if
multiproject_enabled?
&&
ref
.
present?
URI
.
encode
(
"
#{
base_project_url
}
/
#{
project
.
name
}
_
#{
ref
.
gsub
(
'/'
,
'_'
)
}
/scm/bySHA1/
#{
sha
}
"
).
to_s
URI
.
encode
(
"
#{
base_project_url
}
/
#{
project
.
name
}
_
#{
ref
.
tr
(
'/'
,
'_'
)
}
/scm/bySHA1/
#{
sha
}
"
).
to_s
else
else
"
#{
project_url
}
/scm/bySHA1/
#{
sha
}
"
"
#{
project_url
}
/scm/bySHA1/
#{
sha
}
"
end
end
...
...
app/views/projects/tree/_tree_header.html.haml
View file @
63cfe86e
...
@@ -20,16 +20,24 @@
...
@@ -20,16 +20,24 @@
%li
%li
=
link_to
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@id
),
title:
'Create file'
,
id:
'new-file-link'
do
=
link_to
namespace_project_new_blob_path
(
@project
.
namespace
,
@project
,
@id
),
title:
'Create file'
,
id:
'new-file-link'
do
=
icon
(
'pencil fw'
)
=
icon
(
'pencil fw'
)
Create
file
New
file
%li
%li
=
link_to
'#modal-upload-blob'
,
{
'data-target'
=>
'#modal-upload-blob'
,
'data-toggle'
=>
'modal'
}
do
=
link_to
'#modal-upload-blob'
,
{
'data-target'
=>
'#modal-upload-blob'
,
'data-toggle'
=>
'modal'
}
do
=
icon
(
'file fw'
)
=
icon
(
'file fw'
)
Upload file
Upload file
%li
.divider
%li
%li
=
link_to
'#modal-create-new-dir'
,
{
'data-target'
=>
'#modal-create-new-dir'
,
'data-toggle'
=>
'modal'
}
do
=
link_to
'#modal-create-new-dir'
,
{
'data-target'
=>
'#modal-create-new-dir'
,
'data-toggle'
=>
'modal'
}
do
=
icon
(
'folder fw'
)
=
icon
(
'folder fw'
)
New directory
New directory
%li
.divider
%li
=
link_to
new_namespace_project_branch_path
(
@project
.
namespace
,
@project
)
do
=
icon
(
'code-fork fw'
)
New branch
%li
=
link_to
new_namespace_project_tag_path
(
@project
.
namespace
,
@project
)
do
=
icon
(
'tags fw'
)
New tag
-
elsif
!
on_top_of_branch?
-
elsif
!
on_top_of_branch?
%li
%li
%span
.btn.btn-sm.add-to-tree.disabled.has_tooltip
{
title:
"You can only add files when you are on a branch."
,
data:
{
container:
'body'
}}
%span
.btn.btn-sm.add-to-tree.disabled.has_tooltip
{
title:
"You can only add files when you are on a branch."
,
data:
{
container:
'body'
}}
...
...
features/steps/project/merge_requests.rb
View file @
63cfe86e
...
@@ -432,7 +432,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
...
@@ -432,7 +432,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_button
"Submit merge request"
click_button
"Submit merge request"
page
.
within
'.
issuable-title
'
do
page
.
within
'.
detail-page-header
'
do
click_link
"Edit"
click_link
"Edit"
end
end
...
...
lib/api/entities.rb
View file @
63cfe86e
...
@@ -72,7 +72,7 @@ module API
...
@@ -72,7 +72,7 @@ module API
expose
:shared_runners_enabled
expose
:shared_runners_enabled
expose
:creator_id
expose
:creator_id
expose
:namespace
expose
:namespace
expose
:forked_from_project
,
using:
Entities
::
ForkedFromProject
,
if:
lambda
{
|
project
,
options
|
project
.
forked?
}
expose
:forked_from_project
,
using:
Entities
::
ForkedFromProject
,
if:
lambda
{
|
project
,
options
|
project
.
forked?
}
expose
:avatar_url
expose
:avatar_url
expose
:star_count
,
:forks_count
expose
:star_count
,
:forks_count
expose
:open_issues_count
,
if:
lambda
{
|
project
,
options
|
project
.
issues_enabled?
&&
project
.
default_issues_tracker?
}
expose
:open_issues_count
,
if:
lambda
{
|
project
,
options
|
project
.
issues_enabled?
&&
project
.
default_issues_tracker?
}
...
@@ -90,7 +90,7 @@ module API
...
@@ -90,7 +90,7 @@ module API
class
Group
<
Grape
::
Entity
class
Group
<
Grape
::
Entity
expose
:id
,
:name
,
:path
,
:ldap_cn
,
:ldap_access
,
:description
expose
:id
,
:name
,
:path
,
:ldap_cn
,
:ldap_access
,
:description
expose
:ldap_group_links
,
using:
Entities
::
LdapGroupLink
,
if:
lambda
{
|
group
,
options
|
group
.
ldap_group_links
.
any?
}
expose
:ldap_group_links
,
using:
Entities
::
LdapGroupLink
,
if:
lambda
{
|
group
,
options
|
group
.
ldap_group_links
.
any?
}
expose
:avatar_url
expose
:avatar_url
expose
:web_url
do
|
group
,
options
|
expose
:web_url
do
|
group
,
options
|
...
...
spec/lib/gitlab/ldap/access_spec.rb
View file @
63cfe86e
...
@@ -211,7 +211,7 @@ describe Gitlab::LDAP::Access, lib: true do
...
@@ -211,7 +211,7 @@ describe Gitlab::LDAP::Access, lib: true do
it
"should give admin privileges to an User"
do
it
"should give admin privileges to an User"
do
admin_group
=
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
admin_group
=
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
%Q{dn: cn=
#{
access
.
admin_group
}
,ou=groups,dc=bar,dc=com
%Q{dn: cn=
#{
access
.
admin_group
}
,ou=groups,dc=bar,dc=com
cn:
#{
access
.
admin_group
}
cn:
#{
access
.
admin_group
}
description: GitLab admins
description: GitLab admins
gidnumber: 42
gidnumber: 42
...
@@ -220,7 +220,7 @@ memberuid: admin2
...
@@ -220,7 +220,7 @@ memberuid: admin2
memberuid: admin3
memberuid: admin3
objectclass: top
objectclass: top
objectclass: posixGroup
objectclass: posixGroup
}
)
}
)
allow_any_instance_of
(
Gitlab
::
LDAP
::
Adapter
).
to
receive
(
:group
)
{
Gitlab
::
LDAP
::
Group
.
new
(
admin_group
)
}
allow_any_instance_of
(
Gitlab
::
LDAP
::
Adapter
).
to
receive
(
:group
)
{
Gitlab
::
LDAP
::
Group
.
new
(
admin_group
)
}
expect
{
access
.
update_admin_status
}.
to
change
(
user
,
:admin?
).
to
(
true
)
expect
{
access
.
update_admin_status
}.
to
change
(
user
,
:admin?
).
to
(
true
)
...
@@ -229,7 +229,7 @@ objectclass: posixGroup
...
@@ -229,7 +229,7 @@ objectclass: posixGroup
it
"should remove admin privileges from an User"
do
it
"should remove admin privileges from an User"
do
user
.
update_attribute
(
:admin
,
true
)
user
.
update_attribute
(
:admin
,
true
)
admin_group
=
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
admin_group
=
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
%Q{dn: cn=
#{
access
.
admin_group
}
,ou=groups,dc=bar,dc=com
%Q{dn: cn=
#{
access
.
admin_group
}
,ou=groups,dc=bar,dc=com
cn:
#{
access
.
admin_group
}
cn:
#{
access
.
admin_group
}
description: GitLab admins
description: GitLab admins
gidnumber: 42
gidnumber: 42
...
@@ -237,7 +237,7 @@ memberuid: admin1
...
@@ -237,7 +237,7 @@ memberuid: admin1
memberuid: admin3
memberuid: admin3
objectclass: top
objectclass: top
objectclass: posixGroup
objectclass: posixGroup
}
)
}
)
allow_any_instance_of
(
Gitlab
::
LDAP
::
Adapter
).
to
receive
(
:group
)
{
Gitlab
::
LDAP
::
Group
.
new
(
admin_group
)
}
allow_any_instance_of
(
Gitlab
::
LDAP
::
Adapter
).
to
receive
(
:group
)
{
Gitlab
::
LDAP
::
Group
.
new
(
admin_group
)
}
expect
{
access
.
update_admin_status
}.
to
change
(
user
,
:admin?
).
to
(
false
)
expect
{
access
.
update_admin_status
}.
to
change
(
user
,
:admin?
).
to
(
false
)
end
end
...
@@ -350,7 +350,7 @@ objectclass: posixGroup
...
@@ -350,7 +350,7 @@ objectclass: posixGroup
describe
'ldap_groups'
do
describe
'ldap_groups'
do
let
(
:ldap_group_1
)
do
let
(
:ldap_group_1
)
do
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
%Q{dn: cn=
#{
access
.
ldap_config
.
admin_group
}
,ou=groups,dc=bar,dc=com
%Q{dn: cn=
#{
access
.
ldap_config
.
admin_group
}
,ou=groups,dc=bar,dc=com
cn:
#{
access
.
ldap_config
.
admin_group
}
cn:
#{
access
.
ldap_config
.
admin_group
}
description: GitLab group 1
description: GitLab group 1
gidnumber: 42
gidnumber: 42
...
@@ -358,7 +358,7 @@ memberuid: user1
...
@@ -358,7 +358,7 @@ memberuid: user1
memberuid: user2
memberuid: user2
objectclass: top
objectclass: top
objectclass: posixGroup
objectclass: posixGroup
}
)
}
)
end
end
it
"returns an interator of LDAP Groups"
do
it
"returns an interator of LDAP Groups"
do
...
@@ -380,7 +380,7 @@ objectclass: posixGroup
...
@@ -380,7 +380,7 @@ objectclass: posixGroup
describe
:cns_with_access
do
describe
:cns_with_access
do
let
(
:ldap_group_response_1
)
do
let
(
:ldap_group_response_1
)
do
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
%Q{dn: cn=group1,ou=groups,dc=bar,dc=com
%Q{dn: cn=group1,ou=groups,dc=bar,dc=com
cn: group1
cn: group1
description: GitLab group 1
description: GitLab group 1
gidnumber: 21
gidnumber: 21
...
@@ -388,11 +388,12 @@ uniquemember: #{ldap_user.dn.downcase}
...
@@ -388,11 +388,12 @@ uniquemember: #{ldap_user.dn.downcase}
uniquemember: uid=user2,ou=people,dc=example
uniquemember: uid=user2,ou=people,dc=example
objectclass: top
objectclass: top
objectclass: posixGroup
objectclass: posixGroup
}
)
}
)
end
end
let
(
:ldap_group_response_2
)
do
let
(
:ldap_group_response_2
)
do
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
Net
::
LDAP
::
Entry
.
from_single_ldif_string
(
%Q{dn: cn=group2,ou=groups,dc=bar,dc=com
%Q{dn: cn=group2,ou=groups,dc=bar,dc=com
cn: group2
cn: group2
description: GitLab group 2
description: GitLab group 2
gidnumber: 42
gidnumber: 42
...
@@ -400,14 +401,16 @@ memberuid: user3
...
@@ -400,14 +401,16 @@ memberuid: user3
memberuid: user4
memberuid: user4
objectclass: top
objectclass: top
objectclass: posixGroup
objectclass: posixGroup
}
)
}
)
end
end
let
(
:ldap_groups
)
do
let
(
:ldap_groups
)
do
[
[
Gitlab
::
LDAP
::
Group
.
new
(
ldap_group_response_1
),
Gitlab
::
LDAP
::
Group
.
new
(
ldap_group_response_1
),
Gitlab
::
LDAP
::
Group
.
new
(
ldap_group_response_2
)
Gitlab
::
LDAP
::
Group
.
new
(
ldap_group_response_2
)
]
]
end
end
let
(
:ldap_user
)
{
Gitlab
::
LDAP
::
Person
.
new
(
Net
::
LDAP
::
Entry
.
new
,
user
.
ldap_identity
.
provider
)
}
let
(
:ldap_user
)
{
Gitlab
::
LDAP
::
Person
.
new
(
Net
::
LDAP
::
Entry
.
new
,
user
.
ldap_identity
.
provider
)
}
before
do
before
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment