fix 验证码过期等#53446,#50806,#50880
This commit is contained in:
parent
651bf34cfc
commit
399558550e
|
@ -50,9 +50,8 @@ class BaseForm
|
|||
def check_verifi_code(verifi_code, code)
|
||||
code = strip(code)
|
||||
# return if code == "123123" # TODO 万能验证码,用于测试
|
||||
|
||||
raise VerifiCodeError, "验证码不正确" if verifi_code&.code != code
|
||||
raise VerifiCodeError, "验证码已失效" if !verifi_code&.effective?
|
||||
raise VerifiCodeError, "验证码不正确" if verifi_code&.code != code
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -153,6 +153,10 @@ class Issue < ApplicationRecord
|
|||
end
|
||||
end
|
||||
|
||||
def is_collaborators?
|
||||
self.assigned_to_id.present? ? self.project.members.where(user_id: self.assigned_to_id).present? : false
|
||||
end
|
||||
|
||||
def get_issue_tags_name
|
||||
if issue_tags.present?
|
||||
issue_tags.select(:name).uniq.pluck(:name).join(",")
|
||||
|
|
|
@ -5,6 +5,7 @@ json.done_ratio @issue.done_ratio.to_s + "%"
|
|||
json.issue_tags @issue.get_issue_tags
|
||||
json.cannot_edit_tags @cannot_edit_tags
|
||||
json.issue_current_user @issue.author_id == current_user.try(:id)
|
||||
json.assigned_to_id @issue.is_collaborators? ? @issue.assigned_to_id : nil
|
||||
# json.issue_chosen @issue_chosen
|
||||
# json.branches @all_branches
|
||||
json.attachments do
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'zh-CN':
|
||||
activemodel:
|
||||
attributes:
|
||||
projects/create_form:
|
||||
name: 项目名称
|
||||
repository_name: 仓库名称
|
||||
'zh-CN':
|
||||
activemodel:
|
||||
attributes:
|
||||
projects/create_form:
|
||||
name: 项目名称
|
||||
repository_name: 项目标识
|
||||
description: 项目简介
|
Loading…
Reference in New Issue