ishapi 0.1.8.78 → 0.1.8.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c33015b4db15d5e3e7ad0b6a23004868c412670
|
4
|
+
data.tar.gz: af6b758d4271adc70c7f79df1acb1bfe7a1e510e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b52fb21ed4b8782ad4be0a4cf5832e947897ff5dcc45fd1d3f8be33513dd7c53f2bd1d07a69e107310b1230644bc28fd9e15644def6dfa557436af60d3b2356
|
7
|
+
data.tar.gz: 536fdffb20942365ddbbd08da456ef756176748028c4b12d3415642bbea599174858c58dfcdfe2ed931ca9079f7a4dcb9908ef06c81b959fcdfa186678ae73e5
|
@@ -2,7 +2,10 @@ module Ishapi
|
|
2
2
|
class ApplicationController < ActionController::Base
|
3
3
|
protect_from_forgery :prepend => true, :with => :exception
|
4
4
|
layout :false
|
5
|
+
|
6
|
+
before_action :check_profile
|
5
7
|
before_action :set_current_ability
|
8
|
+
|
6
9
|
check_authorization
|
7
10
|
skip_before_action :verify_authenticity_token
|
8
11
|
|
@@ -13,6 +16,10 @@ module Ishapi
|
|
13
16
|
|
14
17
|
# this doesn't generate long-lived token, doesn't update user_profile
|
15
18
|
def check_profile
|
19
|
+
# puts! params, 'params'
|
20
|
+
# puts! current_user, 'current_user'
|
21
|
+
# puts! @current_user, '@current_user'
|
22
|
+
|
16
23
|
accessToken = request.headers[:accessToken]
|
17
24
|
accessToken ||= params[:fb_long_access_token]
|
18
25
|
accessToken ||= params[:accessToken]
|
@@ -26,6 +33,10 @@ module Ishapi
|
|
26
33
|
@current_profile = @current_user.profile
|
27
34
|
@current_order = @current_profile.current_order
|
28
35
|
# orders.where( :submitted_at => nil ).first || ::CoTailors::Order.create( :profile_id => @current_profile.id )
|
36
|
+
|
37
|
+
## for sedux
|
38
|
+
sign_in( @current_user )
|
39
|
+
puts! @current_user, '@current_user 222'
|
29
40
|
end
|
30
41
|
|
31
42
|
def set_profile
|
@@ -81,7 +92,8 @@ module Ishapi
|
|
81
92
|
end
|
82
93
|
|
83
94
|
def set_current_ability
|
84
|
-
@
|
95
|
+
puts! @current_user, '@current_user 111'
|
96
|
+
@current_ability ||= ::Ishapi::Ability.new( @current_user )
|
85
97
|
end
|
86
98
|
|
87
99
|
def puts! a, b=''
|
@@ -19,11 +19,11 @@ module Ishapi
|
|
19
19
|
|
20
20
|
|
21
21
|
if @site.is_private
|
22
|
-
if !params[:
|
22
|
+
if !params[:accessToken]
|
23
23
|
render :json => { :status => :unauthorized}, :status => :unauthorized
|
24
24
|
return
|
25
25
|
end
|
26
|
-
access_token = params[:
|
26
|
+
access_token = params[:accessToken]
|
27
27
|
@graph = Koala::Facebook::API.new( access_token, ::FB[@site.domain][:secret] )
|
28
28
|
@profile = @graph.get_object "me", :fields => 'email'
|
29
29
|
if @site.private_user_emails.include?( @profile['email'] )
|
data/config/routes.rb
CHANGED
@@ -17,8 +17,10 @@ Ishapi::Engine.routes.draw do
|
|
17
17
|
|
18
18
|
get 'events/view/:eventname', :to => 'events#show'
|
19
19
|
|
20
|
-
get
|
21
|
-
|
20
|
+
get 'galleries', :to => 'galleries#index'
|
21
|
+
post 'galleries', :to => 'galleries#index'
|
22
|
+
get 'galleries/view/:galleryname', :to => 'galleries#show'
|
23
|
+
post 'galleries/view/:galleryname', :to => 'galleries#show'
|
22
24
|
|
23
25
|
post 'invoices/search', :to => 'invoices#search'
|
24
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ishapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.79
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-07
|
11
|
+
date: 2018-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|