1 Star 0 Fork 0

leo108 / redmine http authentication plugin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
init.rb 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
leo108 提交于 2014-02-18 17:23 . make all page need auth
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
Ruby
1
https://gitee.com/leo108/redmine-http-authentication-plugin.git
git@gitee.com:leo108/redmine-http-authentication-plugin.git
leo108
redmine-http-authentication-plugin
redmine http authentication plugin
master

搜索帮助