coalescing_panda 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@ module CoalescingPanda
|
|
27
27
|
@tp = IMS::LTI::ToolProvider.new(@lti_account.key, @lti_account.secret, params)
|
28
28
|
authorized = @tp.valid_request?(request)
|
29
29
|
end
|
30
|
-
authorized = authorized && (roles == 0 || (roles
|
30
|
+
authorized = authorized && (roles == 0 || (roles & lti_roles).count > 0)
|
31
31
|
authorized = authorized && @lti_account.validate_nonce(params['oauth_nonce'], DateTime.strptime(params['oauth_timestamp'],'%s'))
|
32
32
|
if !authorized
|
33
33
|
render :text => 'Invalid Credentials, please contact your Administrator.', :status => :unauthorized
|