Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-02 00:06:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-02 00:06:09 +0300
commite0bd3a45d9dc6c74cac1a33ea8c03d6d8334249b (patch)
treedf0bb30b7f0e06cfd59bda5bcadb21bf75ea70cc /app
parented3b1698883bd4ac2c4faf6c05c3a8155748bf91 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/diffs/components/inline_diff_view.vue11
-rw-r--r--app/assets/javascripts/diffs/components/parallel_diff_view.vue13
-rw-r--r--app/policies/group_policy.rb10
-rw-r--r--app/policies/milestone_policy.rb2
-rw-r--r--app/views/dashboard/snippets/index.html.haml4
5 files changed, 17 insertions, 23 deletions
diff --git a/app/assets/javascripts/diffs/components/inline_diff_view.vue b/app/assets/javascripts/diffs/components/inline_diff_view.vue
index aee01409db7..1eb17588376 100644
--- a/app/assets/javascripts/diffs/components/inline_diff_view.vue
+++ b/app/assets/javascripts/diffs/components/inline_diff_view.vue
@@ -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
diff --git a/app/assets/javascripts/diffs/components/parallel_diff_view.vue b/app/assets/javascripts/diffs/components/parallel_diff_view.vue
index d400eb2c586..88baac092a1 100644
--- a/app/assets/javascripts/diffs/components/parallel_diff_view.vue
+++ b/app/assets/javascripts/diffs/components/parallel_diff_view.vue
@@ -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
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb
index f56ac0a5279..951a104122d 100644
--- a/app/policies/group_policy.rb
+++ b/app/policies/group_policy.rb
@@ -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
diff --git a/app/policies/milestone_policy.rb b/app/policies/milestone_policy.rb
index ac4f5b08504..2d56eea6a78 100644
--- a/app/policies/milestone_policy.rb
+++ b/app/policies/milestone_policy.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
class MilestonePolicy < BasePolicy
- delegate { @subject.project }
+ delegate { @subject.parent }
end
diff --git a/app/views/dashboard/snippets/index.html.haml b/app/views/dashboard/snippets/index.html.haml
index b649fe91c24..2caa8e0cac4 100644
--- a/app/views/dashboard/snippets/index.html.haml
+++ b/app/views/dashboard/snippets/index.html.haml
@@ -6,10 +6,6 @@
- if current_user.snippets.exists?
= render partial: 'snippets/snippets_scope_menu', locals: { include_private: true }
-.d-block.d-sm-none
- &nbsp;
- = 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