代码拉取完成,页面将自动刷新
Redmine::Plugin.register :redmine_http_basic_authentication do
name 'Redmine Http Basic Authentication plugin'
author 'Philippe Buergisser'
description 'This plugin can perform HTTP authentication for login'
version '0.0.1'
url 'http://github.com/pburgisser/redmine_http_basic_authentication'
author_url 'http://github.com/pburgisser/redmine_http_basic_authentication'
ActionDispatch::Callbacks.to_prepare do
# use require_dependency if you plan to utilize development mode
require 'redmine_http_basic_authentication_account_patch'
end
end
RedmineApp::Application.config.after_initialize do
# now we should include this module in ApplicationHelper module
unless AccountController.include? RedmineHttpBasicAuthenticationAccountPatch
AccountController.send(:include, RedmineHttpBasicAuthenticationAccountPatch)
end
end
require File.expand_path('../../../app/controllers/application_controller', __FILE__)
class ApplicationController < ActionController::Base
before_filter :check_login , :except => :login
def check_login
redirect_to '/login' unless User.current.logged?
end
end
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。