fix for 新聞與公告QA
1.8.新聞或公告的「檔案室」上傳圖片後再行編輯時,圖片無法正常顯示(但是可以正常被編輯調整並於前台顯示) 2.add 上傳檔案大小限制: 3MB 3.公告的發佈單位為何是顯示單位代碼:M00?應顯示發布單位
This commit is contained in:
1 parent
df722ba90f
commit
818c58c1ee
9 files changed
+48
-20
No files matched your search
@@ -3,7 +3,7 @@ require 'mongo'
|
||||
class GridfsController < ActionController::Metal
|
||||
|
||||
def serve
|
||||
gridfs_path = env["PATH_INFO"].gsub("/gridfs/", "").force_encoding("UTF-8")
|
||||
gridfs_path = (params[:path]+'.'+params[:format]).gsub("/gridfs/", "").force_encoding("UTF-8")
|
||||
begin
|
||||
gridfs_file = Mongo::GridFileSystem.new(Mongoid.database).open(gridfs_path, 'r')
|
||||
self.response_body = gridfs_file.read
|
||||
|
||||
@@ -15,7 +15,7 @@ class SessionsController < Devise::SessionsController
|
||||
if $nccu_ldap_connection.bind
|
||||
logger.info "=LDAP Binded password ok..."
|
||||
result =check_auth_with_ldap(login_uid,login_password)
|
||||
if result #&& login_password!=''
|
||||
if result && login_password!=''
|
||||
logger.info "==LDAP password passed..."
|
||||
nccu_id = get_nccu_id_from_mid_site(login_uid)
|
||||
resource = nccu_id.nil? ? nil : (User.first(conditions:{ nccu_ldap_uid: nccu_id }))
|
||||
|
||||
Reference in new issue
Block a user