|
|
|
@ -20,9 +20,9 @@ class AttachmentsController < ApplicationController
|
|
|
|
|
|
|
|
|
|
before_filter :find_project, :only => [:show, :download, :thumbnail, :destroy, :delete_homework]#, :except => [:upload, :autocomplete]
|
|
|
|
|
before_filter :file_readable, :read_authorize, :only => [:show, :thumbnail]#Modified by young
|
|
|
|
|
before_filter :delete_authorize, :only => :destroy
|
|
|
|
|
before_filter :authorize_global, :only => :upload
|
|
|
|
|
before_filter :authorize_attachment_download1, :only => :download
|
|
|
|
|
before_filter :delete_authorize, :only => [:destroy]
|
|
|
|
|
before_filter :authorize_global, :only => [:upload]
|
|
|
|
|
before_filter :authorize_attachment_download1, :only => [:download]
|
|
|
|
|
#before_filter :login_without_softapplication, only: [:download]
|
|
|
|
|
accept_api_auth :show, :download, :upload
|
|
|
|
|
require 'iconv'
|
|
|
|
|