Merge pull request '细化' (#335) from Trustie/forgeplus:dev_local_v1 into dev_local_v1
This commit is contained in:
commit
9e814ee16a
|
@ -24,7 +24,7 @@
|
|||
//= require codemirror/mode/shell/shell
|
||||
//= require editormd/editormd
|
||||
//= require editormd/languages/zh-tw
|
||||
//= require dragula/dragula
|
||||
|
||||
|
||||
//= require_tree ./i18n
|
||||
//= require_tree ./admins
|
||||
|
|
|
@ -222,11 +222,11 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def require_profile_completed
|
||||
tip_exception(411, "请完善资料后再操作") unless User.current.profile_is_completed?
|
||||
# tip_exception(411, "请完善资料后再操作") unless User.current.profile_is_completed?
|
||||
end
|
||||
|
||||
def require_user_profile_completed(user)
|
||||
tip_exception(412, "请用户完善资料后再操作") unless user.profile_is_completed?
|
||||
# tip_exception(412, "请用户完善资料后再操作") unless user.profile_is_completed?
|
||||
end
|
||||
|
||||
# 异常提醒
|
||||
|
|
|
@ -54,7 +54,7 @@ class ProjectsController < ApplicationController
|
|||
ActiveRecord::Base.transaction do
|
||||
Projects::CreateForm.new(project_params).validate!
|
||||
@project = Projects::CreateService.new(current_user, project_params).call
|
||||
OpenProjectDevOpsJob.set(wait: 5.seconds).perform_later(@project&.id, current_user.id)
|
||||
# OpenProjectDevOpsJob.set(wait: 5.seconds).perform_later(@project&.id, current_user.id)
|
||||
end
|
||||
rescue Exception => e
|
||||
uid_logger_error(e.message)
|
||||
|
|
|
@ -63,6 +63,7 @@ class SettingsController < ApplicationController
|
|||
|
||||
def get_third_party
|
||||
@third_party = []
|
||||
return if EduSetting.get("is_local") == "true"
|
||||
@third_party << {
|
||||
name: 'educoder',
|
||||
url: EducoderOauth.oauth_url
|
||||
|
@ -71,6 +72,7 @@ class SettingsController < ApplicationController
|
|||
|
||||
def get_third_party_new
|
||||
@third_party_new = []
|
||||
return if EduSetting.get("is_local") == "true"
|
||||
@third_party_new << {
|
||||
name: 'educoder',
|
||||
url: EducoderOauth.oauth_url,
|
||||
|
|
|
@ -58,6 +58,7 @@ class BaseForm
|
|||
def check_verifi_code(verifi_code, code)
|
||||
code = strip(code)
|
||||
return if code == "123123" && EduSetting.get("code_debug") # 万能验证码,用于测试 # TODO 万能验证码,用于测试
|
||||
return if EduSetting.get("is_local") == "true" # 本地版不需要验证码
|
||||
raise VerifiCodeError, "验证码已失效" if !verifi_code&.effective?
|
||||
raise VerifiCodeError, "验证码不正确" if verifi_code&.code != code
|
||||
end
|
||||
|
|
|
@ -15,7 +15,7 @@ class MigrateRemoteRepositoryJob < ApplicationJob
|
|||
## open jianmu devops
|
||||
project_id = repo&.project&.id
|
||||
puts "############ mirror project_id,user_id: #{project_id},#{user_id} ############"
|
||||
OpenProjectDevOpsJob.set(wait: 5.seconds).perform_later(project_id, user_id) if project_id.present? && user_id.present?
|
||||
# OpenProjectDevOpsJob.set(wait: 5.seconds).perform_later(project_id, user_id) if project_id.present? && user_id.present?
|
||||
puts "############ mirror status: #{repo.mirror.status} ############"
|
||||
else
|
||||
repo&.mirror&.failed!
|
||||
|
|
|
@ -34,7 +34,7 @@ class Api::V1::Users::Projects::ListService < ApplicationService
|
|||
|
||||
private
|
||||
def project_query_data
|
||||
if current_user.admin?
|
||||
if current_user.admin? || observe_user.id == current_user.id
|
||||
projects = Project
|
||||
else
|
||||
projects = Project.visible
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddForgeAppliedMessageUtf8mb4 < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
execute("ALTER TABLE `forge_applied_messages` MODIFY `name` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
|
||||
end
|
||||
end
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue