diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-01 06:05:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-01 06:05:57 +0300 |
commit | ec60358d52be0dc99f52db94dc95209f1486eac9 (patch) | |
tree | ae697a01f32bf46443fcdbdefe9873caf62a18b3 /app | |
parent | b38cf7ccdf8b7ca90bce587a1bf4765631733017 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/ide/.eslintrc.yml | 3 | ||||
-rw-r--r-- | app/models/lfs_object.rb | 8 | ||||
-rw-r--r-- | app/views/admin/labels/destroy.js.haml | 4 | ||||
-rw-r--r-- | app/views/admin/labels/index.html.haml | 4 |
4 files changed, 13 insertions, 6 deletions
diff --git a/app/assets/javascripts/ide/.eslintrc.yml b/app/assets/javascripts/ide/.eslintrc.yml new file mode 100644 index 00000000000..92b96d717be --- /dev/null +++ b/app/assets/javascripts/ide/.eslintrc.yml @@ -0,0 +1,3 @@ +rules: + # https://gitlab.com/gitlab-org/gitlab/issues/33024 + promise/no-nesting: off diff --git a/app/models/lfs_object.rb b/app/models/lfs_object.rb index f73aa2705b7..d31d6226559 100644 --- a/app/models/lfs_object.rb +++ b/app/models/lfs_object.rb @@ -24,7 +24,13 @@ class LfsObject < ApplicationRecord end def project_allowed_access?(project) - projects.exists?(project.lfs_storage_project.id) + if project.fork_network_member + lfs_objects_projects + .where("EXISTS(?)", project.fork_network.fork_network_members.select(1).where("fork_network_members.project_id = lfs_objects_projects.project_id")) + .exists? + else + lfs_objects_projects.where(project_id: project.id).exists? + end end def local_store? diff --git a/app/views/admin/labels/destroy.js.haml b/app/views/admin/labels/destroy.js.haml index 7a0dcbdd1c6..394d3c11f31 100644 --- a/app/views/admin/labels/destroy.js.haml +++ b/app/views/admin/labels/destroy.js.haml @@ -1,2 +1,2 @@ -- if @labels.size == 0 - $('.labels').load(document.URL + ' .card.bg-light').hide().fadeIn(1000) +- if @labels.size.zero? + $('.labels').load(document.URL + ' .nothing-here-block').hide().fadeIn(1000) diff --git a/app/views/admin/labels/index.html.haml b/app/views/admin/labels/index.html.haml index 5a5b3d18c5f..38137f360fd 100644 --- a/app/views/admin/labels/index.html.haml +++ b/app/views/admin/labels/index.html.haml @@ -14,6 +14,4 @@ = paginate @labels, theme: 'gitlab' - else - .card.bg-light - .nothing-here-block= _('There are no labels yet') - + .nothing-here-block= _('There are no labels yet') |