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
e0bd3a45
Commit
e0bd3a45
authored
Oct 01, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
ed3b1698
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
54 additions
and
28 deletions
+54
-28
app/assets/javascripts/diffs/components/inline_diff_view.vue
app/assets/javascripts/diffs/components/inline_diff_view.vue
+5
-6
app/assets/javascripts/diffs/components/parallel_diff_view.vue
...ssets/javascripts/diffs/components/parallel_diff_view.vue
+6
-7
app/policies/group_policy.rb
app/policies/group_policy.rb
+5
-5
app/policies/milestone_policy.rb
app/policies/milestone_policy.rb
+1
-1
app/views/dashboard/snippets/index.html.haml
app/views/dashboard/snippets/index.html.haml
+0
-4
changelogs/unreleased/32192-remove-gap-at-the-top-of-expandable-code-diff-blocks.yml
...-remove-gap-at-the-top-of-expandable-code-diff-blocks.yml
+5
-0
changelogs/unreleased/issue_32364.yml
changelogs/unreleased/issue_32364.yml
+5
-0
changelogs/unreleased/remove-duplicate-primary-button-in-dashboard-snippets.yml
...remove-duplicate-primary-button-in-dashboard-snippets.yml
+5
-0
lib/gitlab/search_results.rb
lib/gitlab/search_results.rb
+1
-1
spec/lib/gitlab/search_results_spec.rb
spec/lib/gitlab/search_results_spec.rb
+2
-2
spec/policies/group_policy_spec.rb
spec/policies/group_policy_spec.rb
+18
-2
spec/support/shared_contexts/policies/group_policy_shared_context.rb
...t/shared_contexts/policies/group_policy_shared_context.rb
+1
-0
No files found.
app/assets/javascripts/diffs/components/inline_diff_view.vue
View file @
e0bd3a45
...
...
@@ -45,12 +45,11 @@ export default {
:data-commit-id=
"commitId"
class=
"code diff-wrap-lines js-syntax-highlight text-file js-diff-inline-view"
>
<!-- Need to insert an empty row to solve "table-layout:fixed" equal width when expansion row is the first line -->
<tr>
<td
style=
"width: 50px;"
></td>
<td
style=
"width: 50px;"
></td>
<td></td>
</tr>
<colgroup>
<col
style=
"width: 50px;"
/>
<col
style=
"width: 50px;"
/>
<col
/>
</colgroup>
<tbody>
<template
v-for=
"(line, index) in diffLines"
>
<inline-diff-expansion-row
...
...
app/assets/javascripts/diffs/components/parallel_diff_view.vue
View file @
e0bd3a45
...
...
@@ -45,13 +45,12 @@ export default {
:data-commit-id=
"commitId"
class=
"code diff-wrap-lines js-syntax-highlight text-file"
>
<!-- Need to insert an empty row to solve "table-layout:fixed" equal width when expansion row is the first line -->
<tr>
<td
style=
"width: 50px;"
></td>
<td></td>
<td
style=
"width: 50px;"
></td>
<td></td>
</tr>
<colgroup>
<col
style=
"width: 50px;"
/>
<col
/>
<col
style=
"width: 50px;"
/>
<col
/>
</colgroup>
<tbody>
<template
v-for=
"(line, index) in diffLines"
>
<parallel-diff-expansion-row
...
...
app/policies/group_policy.rb
View file @
e0bd3a45
...
...
@@ -44,25 +44,25 @@ class GroupPolicy < BasePolicy
rule
{
public_group
}.
policy
do
enable
:read_group
enable
:read_list
enable
:read_label
end
rule
{
logged_in_viewable
}.
enable
:read_group
rule
{
guest
}.
policy
do
enable
:read_group
enable
:read_list
enable
:upload_file
enable
:read_label
end
rule
{
admin
}.
enable
:read_group
rule
{
has_projects
}.
policy
do
enable
:read_group
end
rule
{
can?
(
:read_group
)
}.
policy
do
enable
:read_milestone
enable
:read_list
enable
:read_label
enable
:read_group
end
rule
{
has_access
}.
enable
:read_namespace
...
...
app/policies/milestone_policy.rb
View file @
e0bd3a45
# frozen_string_literal: true
class
MilestonePolicy
<
BasePolicy
delegate
{
@subject
.
p
rojec
t
}
delegate
{
@subject
.
p
aren
t
}
end
app/views/dashboard/snippets/index.html.haml
View file @
e0bd3a45
...
...
@@ -6,10 +6,6 @@
-
if
current_user
.
snippets
.
exists?
=
render
partial:
'snippets/snippets_scope_menu'
,
locals:
{
include_private:
true
}
.d-block.d-sm-none
=
link_to
_
(
"New snippet"
),
new_snippet_path
,
class:
"btn btn-success btn-block"
,
title:
_
(
"New snippet"
)
-
if
current_user
.
snippets
.
exists?
=
render
partial:
'shared/snippets/list'
,
locals:
{
link_project:
true
}
-
else
...
...
changelogs/unreleased/32192-remove-gap-at-the-top-of-expandable-code-diff-blocks.yml
0 → 100644
View file @
e0bd3a45
---
title
:
Remove thin white line at top of diff view code blocks
merge_request
:
17026
author
:
type
:
fixed
changelogs/unreleased/issue_32364.yml
0 → 100644
View file @
e0bd3a45
---
title
:
Fix permissions for group milestones
merge_request
:
author
:
type
:
fixed
changelogs/unreleased/remove-duplicate-primary-button-in-dashboard-snippets.yml
0 → 100644
View file @
e0bd3a45
---
title
:
Remove duplicate primary button in dashboard snippets
merge_request
:
32048
author
:
George Tsiolis
type
:
fixed
lib/gitlab/search_results.rb
View file @
e0bd3a45
...
...
@@ -2,7 +2,7 @@
module
Gitlab
class
SearchResults
COUNT_LIMIT
=
10
1
COUNT_LIMIT
=
10
0
COUNT_LIMIT_MESSAGE
=
"
#{
COUNT_LIMIT
-
1
}
+"
attr_reader
:current_user
,
:query
,
:per_page
...
...
spec/lib/gitlab/search_results_spec.rb
View file @
e0bd3a45
...
...
@@ -57,8 +57,8 @@ describe Gitlab::SearchResults do
where
(
:count
,
:expected
)
do
23
|
'23'
100
|
'100
'
10
1
|
max_limited_count
99
|
'99
'
10
0
|
max_limited_count
1234
|
max_limited_count
end
...
...
spec/policies/group_policy_spec.rb
View file @
e0bd3a45
...
...
@@ -9,6 +9,7 @@ describe GroupPolicy do
it
do
expect_allowed
(
:read_group
)
expect_allowed
(
*
read_group_permissions
)
expect_disallowed
(
:upload_file
)
expect_disallowed
(
*
reporter_permissions
)
expect_disallowed
(
*
developer_permissions
)
...
...
@@ -27,6 +28,7 @@ describe GroupPolicy do
end
it
{
expect_disallowed
(
:read_group
)
}
it
{
expect_disallowed
(
*
read_group_permissions
)
}
end
context
'with foreign user and public project'
do
...
...
@@ -39,6 +41,7 @@ describe GroupPolicy do
end
it
{
expect_disallowed
(
:read_group
)
}
it
{
expect_disallowed
(
*
read_group_permissions
)
}
end
context
'has projects'
do
...
...
@@ -49,13 +52,13 @@ describe GroupPolicy do
project
.
add_developer
(
current_user
)
end
it
{
expect_allowed
(
:read_label
,
:read_list
)
}
it
{
expect_allowed
(
*
read_group_permissions
)
}
context
'in subgroups'
do
let
(
:subgroup
)
{
create
(
:group
,
:private
,
parent:
group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
subgroup
)
}
it
{
expect_allowed
(
:read_label
,
:read_list
)
}
it
{
expect_allowed
(
*
read_group_permissions
)
}
end
end
...
...
@@ -63,6 +66,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
guest
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_disallowed
(
*
reporter_permissions
)
expect_disallowed
(
*
developer_permissions
)
...
...
@@ -75,6 +79,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
reporter
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_disallowed
(
*
developer_permissions
)
...
...
@@ -87,6 +92,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
developer
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_allowed
(
*
developer_permissions
)
...
...
@@ -110,6 +116,7 @@ describe GroupPolicy do
updated_owner_permissions
=
owner_permissions
-
create_subgroup_permission
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_allowed
(
*
developer_permissions
)
...
...
@@ -120,6 +127,7 @@ describe GroupPolicy do
context
'with subgroup_creation_level set to owner'
do
it
'allows every maintainer permission'
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_allowed
(
*
developer_permissions
)
...
...
@@ -133,6 +141,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
owner
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_allowed
(
*
developer_permissions
)
...
...
@@ -145,6 +154,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
admin
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_allowed
(
*
developer_permissions
)
...
...
@@ -176,6 +186,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
nil
}
it
do
expect_disallowed
(
*
read_group_permissions
)
expect_disallowed
(
*
guest_permissions
)
expect_disallowed
(
*
reporter_permissions
)
expect_disallowed
(
*
developer_permissions
)
...
...
@@ -188,6 +199,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
guest
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_disallowed
(
*
reporter_permissions
)
expect_disallowed
(
*
developer_permissions
)
...
...
@@ -200,6 +212,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
reporter
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_disallowed
(
*
developer_permissions
)
...
...
@@ -212,6 +225,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
developer
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_allowed
(
*
developer_permissions
)
...
...
@@ -224,6 +238,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
maintainer
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_allowed
(
*
developer_permissions
)
...
...
@@ -236,6 +251,7 @@ describe GroupPolicy do
let
(
:current_user
)
{
owner
}
it
do
expect_allowed
(
*
read_group_permissions
)
expect_allowed
(
*
guest_permissions
)
expect_allowed
(
*
reporter_permissions
)
expect_allowed
(
*
developer_permissions
)
...
...
spec/support/shared_contexts/policies/group_policy_shared_context.rb
View file @
e0bd3a45
...
...
@@ -16,6 +16,7 @@ RSpec.shared_context 'GroupPolicy context' do
read_group_merge_requests
]
end
let
(
:read_group_permissions
)
{
%i[read_label read_list read_milestone]
}
let
(
:reporter_permissions
)
{
%i[admin_label read_container_image]
}
let
(
:developer_permissions
)
{
[
:admin_milestone
]
}
let
(
:maintainer_permissions
)
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