Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use namespace instead of canvas_page_name

  • Loading branch information...
commit 9a8e58aa2888efcb44df9ef685265dff5602296f 1 parent a43588f
@dekart authored
View
4 lib/facepalm/config.rb
@@ -27,7 +27,7 @@ def initialize(options = {})
end
# Defining methods for quick access to config values
- %w{app_id secret canvas_page_name callback_domain}.each do |attribute|
+ %w{app_id secret namespace callback_domain}.each do |attribute|
class_eval %{
def #{ attribute }
config[:#{ attribute }]
@@ -55,7 +55,7 @@ def subscription_token
# URL of the application canvas page
def canvas_page_url(protocol)
- "#{ protocol }apps.facebook.com/#{ canvas_page_name }"
+ "#{ protocol }apps.facebook.com/#{ namespace }"
end
# Application callback URL
View
4 lib/facepalm/rails/controller/oauth_access.rb
@@ -46,6 +46,10 @@ def facepalm_authentication(*permissions)
# Requires a given set of permissions in context of the current action.
# Use it to require permissions in a single action or custom filter.
#
+ # NOTE: Facepalm doesn't check if user provided all required permissions.
+ # It only checks if user was authenticated and redirects to permission
+ # request page with a given set of permissions.
+ #
# @param permissions An array of permissions to require
#
# @return true if user authorized the application, false otehrwise
Please sign in to comment.
Something went wrong with that request. Please try again.