修改bug

This commit is contained in:
sylor_huang@126.com 2020-03-27 16:49:08 +08:00
parent 38794cd2d3
commit c78508dfd6
10 changed files with 129109 additions and 10 deletions

View File

@ -11,7 +11,7 @@ class IssuesController < ApplicationController
include TagChosenHelper
def index
@user_admin_or_member = current_user.present? && (current_user.admin || @project.member?(current_user))
@user_admin_or_member = current_user.logged? && (current_user.admin || @project.member?(current_user))
issues = @project.issues.issue_issue.includes(:user,:tracker, :priority, :version, :issue_status, :journals, :issue_times)
issues = issues.where(is_private: false) unless @user_admin_or_member
@all_issues_size = issues.size
@ -276,7 +276,7 @@ class IssuesController < ApplicationController
end
def show
@user_permission = current_user.present? && (!@issue.is_lock || @project.member?(current_user) || current_user.admin? || @issue.user == current_user)
@user_permission = current_user.logged? && (!@issue.is_lock || @project.member?(current_user) || current_user.admin? || @issue.user == current_user)
@issue_attachments = @issue.attachments
@issue_user = @issue.user
@issue_assign_to = @issue.get_assign_user

View File

@ -1,5 +1,5 @@
class JournalsController < ApplicationController
before_action :require_login
before_action :require_login, except: :index
before_action :set_issue
before_action :check_issue_permission
before_action :set_journal, only: [:destroy, :edit, :update]
@ -16,6 +16,8 @@ class JournalsController < ApplicationController
notes = params[:content]
if notes.blank?
normal_status(-1, "评论内容不能为空")
elsif current_user.logged?
normal_status(-1, "请登录")
else
journal_params = {
journalized_id: @issue.id ,

View File

@ -243,7 +243,7 @@ class PullRequestsController < ApplicationController
end
def show
@user_permission = current_user.present? && (!@issue.is_lock || @project.member?(current_user) || current_user.admin? || @issue.user == current_user)
@user_permission = current_user.logged? && (!@issue.is_lock || @project.member?(current_user) || current_user.admin? || @issue.user == current_user)
@issue_attachments = @issue.attachments
@issue_user = @issue.user
@issue_assign_to = @issue.get_assign_user

View File

@ -100,7 +100,7 @@ class Project < ApplicationRecord
end
def self.list_user_projects(user_id)
user_not_show = Project.joins(:members).where("projects.is_public = ? and (projects.user_id != ? or members.user_id != ?)", false, user_id,user_id).pluck(:id).uniq
user_not_show = Project.joins(:members).where("projects.is_public = ? and projects.user_id != ? and members.user_id != ?", false, user_id,user_id).pluck(:id).uniq
Project.where.not(id: user_not_show)
end

View File

@ -125,7 +125,7 @@
"./static/js/209.84f3043d.chunk.js": "./static/js/209.84f3043d.chunk.js",
"./static/js/21.7ad82999.chunk.js": "./static/js/21.7ad82999.chunk.js",
"./static/js/210.823039f6.chunk.js": "./static/js/210.823039f6.chunk.js",
"./static/js/211.5cd224c3.chunk.js": "./static/js/211.5cd224c3.chunk.js",
"./static/js/211.85ef84ba.chunk.js": "./static/js/211.85ef84ba.chunk.js",
"./static/js/212.089afb22.chunk.js": "./static/js/212.089afb22.chunk.js",
"./static/js/213.a4c081ab.chunk.js": "./static/js/213.a4c081ab.chunk.js",
"./static/js/214.cf63af57.chunk.js": "./static/js/214.cf63af57.chunk.js",
@ -254,7 +254,7 @@
"./static/js/72.225b456b.chunk.js": "./static/js/72.225b456b.chunk.js",
"./static/js/73.57f0d25d.chunk.js": "./static/js/73.57f0d25d.chunk.js",
"./static/js/74.b4ee0232.chunk.js": "./static/js/74.b4ee0232.chunk.js",
"./static/js/75.17a20598.chunk.js": "./static/js/75.17a20598.chunk.js",
"./static/js/75.f37e5c18.chunk.js": "./static/js/75.f37e5c18.chunk.js",
"./static/js/76.5de55d56.chunk.js": "./static/js/76.5de55d56.chunk.js",
"./static/js/77.53bbeeca.chunk.js": "./static/js/77.53bbeeca.chunk.js",
"./static/js/78.0cb0ffe8.chunk.js": "./static/js/78.0cb0ffe8.chunk.js",
@ -282,7 +282,7 @@
"./static/js/98.1d688383.chunk.js": "./static/js/98.1d688383.chunk.js",
"./static/js/99.4a932041.chunk.js": "./static/js/99.4a932041.chunk.js",
"main.css": "./static/css/main.fd229636.css",
"main.js": "./static/js/main.28ff4c3a.js",
"main.js": "./static/js/main.8bfa28c3.js",
"static/media/KaTeX_AMS-Regular.ttf": "static/media/KaTeX_AMS-Regular.aaf4eee9.ttf",
"static/media/KaTeX_AMS-Regular.woff": "static/media/KaTeX_AMS-Regular.7f06b4e3.woff",
"static/media/KaTeX_AMS-Regular.woff2": "static/media/KaTeX_AMS-Regular.e78e28b4.woff2",

View File

@ -24,7 +24,7 @@
_host = 'https://ali-cdn.educoder.net/react/build/'
}
document.write('<script type="text/javascript" src="' + _host + 'js/js_min_all.js"><\/script>');
document.write('<script type="text/javascript" src="' + _host + 'static/js/main.28ff4c3a.js"><\/script>');
document.write('<script type="text/javascript" src="' + _host + 'static/js/main.8bfa28c3.js"><\/script>');
})()
</script>
<script>!function(){var t=location.href;"3007"===window.location.port?-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="https://newweb.educoder.net/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="https://newweb.educoder.net/javascripts/educoder/edu_application.js"><\/script>'):-1!=t.indexOf("/tasks/")?(document.write('<script type="text/javascript" src="/assets/kindeditor/kindeditor.js"><\/script>'),document.write('<script type="text/javascript" src="/react/build/js/create_kindeditor.js?v=1.1.1"><\/script>'),document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')):-1!=t.indexOf("/paths/")&&document.write('<script type="text/javascript" src="/javascripts/educoder/edu_application.js"><\/script>')}()</script><script type="text/javascript" src="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.js"></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long