#219: removed unnecessary code

This commit is contained in:
Vokhmin Alexey V 2013-07-16 16:02:50 +04:00
parent d0fae38e17
commit 279ff5c568
1 changed files with 0 additions and 27 deletions

View File

@ -7,38 +7,11 @@ class Api::V1::PlatformsController < Api::V1::BaseController
load_and_authorize_resource :except => :allowed
def allowed
# platform_name = (params[:path] || '').gsub(/^[\/]+/, '')
# .match(/^(#{Platform::NAME_PATTERN}\/|#{Platform::NAME_PATTERN}$)/)
if Platform.allowed?(params[:path] || '', request)
render :nothing => true
else
render :nothing => true, :status => 403
end
# render(:nothing => true) && return unless platform_name
# platform_name = platform_name[0].gsub(/\//, '')
# platform = Platform.find_by_name platform_name
# render(:nothing => true, :status => 403) && return unless platform
# render(:nothing => true) && return unless platform.hidden?
# if request.authorization.present?
# token, pass = *ActionController::HttpAuthentication::Basic::user_name_and_password(request)
# else
# render(:nothing => true, :status => 403) && return
# end
# render(:nothing => true) && return if platform.tokens.by_active.where(:authentication_token => token).exists?
# user = User.find_by_authentication_token token
# @current_ability, @current_user = nil, user
# if user && can?(:show, platform)
# render :nothing => true
# else
# render :nothing => true, :status => 403
# end
end
def index