Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_cs_new
caishi 6 years ago
commit 226d9678b7

@ -26,6 +26,12 @@ class Users::BaseController < ApplicationController
render_forbidden
end
def require_teacher!
return if current_user.admin_or_business? || observed_user.is_teacher?
render_forbidden
end
def require_auth_teacher!
return if current_user.admin_or_business? || observed_user.certification_teacher?

@ -1,5 +1,6 @@
class Users::VideosController < Users::BaseController
before_action :private_user_resources!, :check_account
before_action :require_teacher!
before_action :require_auth_teacher!, except: [:index, :review]
helper_method :current_video

Loading…
Cancel
Save