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
60d0ce8a
Commit
60d0ce8a
authored
Mar 13, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
2f7ee20d
535410a9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
9 deletions
+27
-9
app/assets/javascripts/emoji/index.js
app/assets/javascripts/emoji/index.js
+1
-4
app/policies/group_policy.rb
app/policies/group_policy.rb
+2
-1
changelogs/unreleased/modify_group_policy.yml
changelogs/unreleased/modify_group_policy.yml
+5
-0
changelogs/unreleased/sh-fix-blank-codeowners-ce.yml
changelogs/unreleased/sh-fix-blank-codeowners-ce.yml
+5
-0
lib/gitlab/user_extractor.rb
lib/gitlab/user_extractor.rb
+1
-0
spec/features/security/group/private_access_spec.rb
spec/features/security/group/private_access_spec.rb
+5
-4
spec/lib/gitlab/user_extractor_spec.rb
spec/lib/gitlab/user_extractor_spec.rb
+8
-0
No files found.
app/assets/javascripts/emoji/index.js
View file @
60d0ce8a
...
...
@@ -33,10 +33,7 @@ export function initEmojiMap() {
}
axiosInstance
.
get
(
`
${
gon
.
asset_host
||
''
}${
gon
.
relative_url_root
||
''
}
/-/emojis/
${
EMOJI_VERSION
}
/emojis.json`
,
)
.
get
(
`
${
gon
.
relative_url_root
||
''
}
/-/emojis/
${
EMOJI_VERSION
}
/emojis.json`
)
.
then
(({
data
})
=>
{
emojiMap
=
data
;
validEmojiNames
=
[...
Object
.
keys
(
emojiMap
),
...
Object
.
keys
(
emojiAliases
)];
...
...
app/policies/group_policy.rb
View file @
60d0ce8a
...
...
@@ -26,7 +26,7 @@ class GroupPolicy < BasePolicy
condition
(
:can_change_parent_share_with_group_lock
)
{
can?
(
:change_share_with_group_lock
,
@subject
.
parent
)
}
condition
(
:has_projects
)
do
GroupProjectsFinder
.
new
(
group:
@subject
,
current_user:
@user
,
options:
{
include_subgroups:
true
}).
execute
.
any?
GroupProjectsFinder
.
new
(
group:
@subject
,
current_user:
@user
,
options:
{
include_subgroups:
true
,
only_owned:
true
}).
execute
.
any?
end
condition
(
:has_clusters
,
scope: :subject
)
{
clusterable_has_clusters?
}
...
...
@@ -55,6 +55,7 @@ class GroupPolicy < BasePolicy
rule
{
has_projects
}.
policy
do
enable
:read_list
enable
:read_label
enable
:read_group
end
rule
{
has_access
}.
enable
:read_namespace
...
...
changelogs/unreleased/modify_group_policy.yml
0 → 100644
View file @
60d0ce8a
---
title
:
Allow project members to see private group if the project is in the group namespace
merge_request
:
author
:
type
:
fixed
changelogs/unreleased/sh-fix-blank-codeowners-ce.yml
0 → 100644
View file @
60d0ce8a
---
title
:
Fix 500 error caused by CODEOWNERS with no matches
merge_request
:
26072
author
:
type
:
fixed
lib/gitlab/user_extractor.rb
View file @
60d0ce8a
...
...
@@ -16,6 +16,7 @@ module Gitlab
def
users
return
User
.
none
unless
@text
.
present?
return
User
.
none
if
references
.
empty?
@users
||=
User
.
from_union
(
union_relations
)
end
...
...
spec/features/security/group/private_access_spec.rb
View file @
60d0ce8a
...
...
@@ -28,7 +28,7 @@ describe 'Private Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:guest
).
of
(
group
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
project_guest
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
project_guest
)
}
it
{
is_expected
.
to
be_denied_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
...
...
@@ -44,7 +44,7 @@ describe 'Private Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:guest
).
of
(
group
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
project_guest
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
project_guest
)
}
it
{
is_expected
.
to
be_denied_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
...
...
@@ -61,7 +61,7 @@ describe 'Private Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:guest
).
of
(
group
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
project_guest
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
project_guest
)
}
it
{
is_expected
.
to
be_denied_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
...
...
@@ -77,7 +77,7 @@ describe 'Private Group access' do
it
{
is_expected
.
to
be_allowed_for
(
:developer
).
of
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:reporter
).
of
(
group
)
}
it
{
is_expected
.
to
be_allowed_for
(
:guest
).
of
(
group
)
}
it
{
is_expected
.
to
be_
deni
ed_for
(
project_guest
)
}
it
{
is_expected
.
to
be_
allow
ed_for
(
project_guest
)
}
it
{
is_expected
.
to
be_denied_for
(
:user
)
}
it
{
is_expected
.
to
be_denied_for
(
:external
)
}
it
{
is_expected
.
to
be_denied_for
(
:visitor
)
}
...
...
@@ -101,6 +101,7 @@ describe 'Private Group access' do
describe
'GET /groups/:path for shared projects'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
before
do
Projects
::
GroupLinks
::
CreateService
.
new
(
project
,
...
...
spec/lib/gitlab/user_extractor_spec.rb
View file @
60d0ce8a
...
...
@@ -60,6 +60,14 @@ describe Gitlab::UserExtractor do
it
'includes all mentioned usernames'
do
expect
(
extractor
.
matches
[
:usernames
]).
to
contain_exactly
(
'user-1'
,
'user-2'
,
'user-4'
)
end
context
'input has no matching e-mail or usernames'
do
it
'returns an empty list of users'
do
extractor
=
described_class
.
new
(
'My test'
)
expect
(
extractor
.
users
).
to
be_empty
end
end
end
describe
'#references'
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