anoubis 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/anoubis/application_controller.rb +18 -6
- data/app/controllers/anoubis/core/application_controller.rb +6 -6
- data/app/controllers/anoubis/core/data/actions.rb +15 -15
- data/app/controllers/anoubis/core/data/callbacks.rb +5 -5
- data/app/controllers/anoubis/core/data/convert.rb +33 -33
- data/app/controllers/anoubis/core/data/defaults.rb +8 -8
- data/app/controllers/anoubis/core/data/get.rb +14 -14
- data/app/controllers/anoubis/core/data/load.rb +3 -3
- data/app/controllers/anoubis/core/data/set.rb +2 -2
- data/app/controllers/anoubis/core/data/setup.rb +5 -5
- data/app/controllers/anoubis/core/data_controller.rb +10 -10
- data/app/controllers/anoubis/core/index/actions.rb +2 -2
- data/app/controllers/anoubis/core/index/callbacks.rb +1 -1
- data/app/controllers/anoubis/core/index_controller.rb +4 -4
- data/app/controllers/anoubis/etc/base.rb +16 -11
- data/app/controllers/anoubis/etc/data.rb +1 -1
- data/app/controllers/anoubis/etc/field.rb +10 -10
- data/app/controllers/anoubis/etc/field_options.rb +1 -1
- data/app/controllers/anoubis/etc/field_order.rb +1 -1
- data/app/controllers/anoubis/etc/filter.rb +2 -2
- data/app/controllers/anoubis/etc/menu.rb +2 -2
- data/app/controllers/anoubis/etc/model.rb +1 -1
- data/app/controllers/anoubis/etc/tab_item.rb +1 -1
- data/app/controllers/anoubis/etc.rb +1 -1
- data/app/controllers/anoubis/export.rb +1 -1
- data/app/controllers/anoubis/output/autocomplete.rb +1 -1
- data/app/controllers/anoubis/output/basic.rb +1 -1
- data/app/controllers/anoubis/output/data.rb +1 -1
- data/app/controllers/anoubis/output/delete.rb +1 -1
- data/app/controllers/anoubis/output/edit.rb +1 -1
- data/app/controllers/anoubis/output/frame.rb +5 -5
- data/app/controllers/anoubis/output/login.rb +1 -1
- data/app/controllers/anoubis/output/menu.rb +3 -3
- data/app/controllers/anoubis/output/update.rb +1 -1
- data/app/controllers/anoubis/sso/client/application_controller.rb +2 -2
- data/app/controllers/anoubis/sso/client/data/actions.rb +2 -2
- data/app/controllers/anoubis/sso/client/data/callbacks.rb +2 -2
- data/app/controllers/anoubis/sso/client/data/convert.rb +2 -2
- data/app/controllers/anoubis/sso/client/data/defaults.rb +2 -2
- data/app/controllers/anoubis/sso/client/data/get.rb +2 -2
- data/app/controllers/anoubis/sso/client/data/load.rb +6 -6
- data/app/controllers/anoubis/sso/client/data/set.rb +2 -2
- data/app/controllers/anoubis/sso/client/data/setup.rb +2 -2
- data/app/controllers/anoubis/sso/client/data_controller.rb +9 -9
- data/app/controllers/anoubis/sso/client/index/actions.rb +6 -6
- data/app/controllers/anoubis/sso/client/index/callbacks.rb +1 -1
- data/app/controllers/anoubis/sso/client/index_controller.rb +3 -3
- data/app/controllers/anoubis/sso/server/application_controller.rb +2 -2
- data/app/controllers/anoubis/sso/server/login_controller.rb +1 -1
- data/app/controllers/anoubis/sso/server/user_controller.rb +1 -1
- data/app/controllers/anoubis/tenant/application_controller.rb +4 -4
- data/app/controllers/anoubis/tenant/data/actions.rb +2 -2
- data/app/controllers/anoubis/tenant/data/callbacks.rb +2 -2
- data/app/controllers/anoubis/tenant/data/convert.rb +2 -2
- data/app/controllers/anoubis/tenant/data/defaults.rb +2 -2
- data/app/controllers/anoubis/tenant/data/get.rb +2 -2
- data/app/controllers/anoubis/tenant/data/load.rb +5 -5
- data/app/controllers/anoubis/tenant/data/set.rb +2 -2
- data/app/controllers/anoubis/tenant/data/setup.rb +2 -2
- data/app/controllers/anoubis/tenant/data_controller.rb +10 -10
- data/app/controllers/anoubis/tenant/index/actions.rb +15 -15
- data/app/controllers/anoubis/tenant/index/callbacks.rb +2 -2
- data/app/controllers/anoubis/tenant/index_controller.rb +4 -4
- data/app/controllers/anoubis/tenants_controller.rb +1 -1
- data/app/controllers/anoubis/users_controller.rb +1 -1
- data/app/models/anoubis/application_record.rb +2 -2
- data/app/models/anoubis/core/application_record.rb +3 -3
- data/app/models/anoubis/sso/client/group_menu.rb +6 -6
- data/app/models/anoubis/sso/client/menu.rb +8 -8
- data/app/models/anoubis/sso/client/user.rb +3 -3
- data/app/models/anoubis/sso/server/user.rb +1 -1
- data/app/models/anoubis/tenant/group_menu.rb +5 -5
- data/app/models/anoubis/tenant/menu.rb +13 -13
- data/app/models/anoubis/tenant/system.rb +5 -5
- data/app/models/anoubis/tenant/user.rb +4 -4
- data/app/services/anoubis/session_service.rb +1 -1
- data/config/locales/en.yml +17 -2
- data/config/locales/ru.yml +18 -3
- data/db/seeds.rb +30 -30
- data/lib/anoubis/version.rb +1 -1
- data/lib/anoubis.rb +1 -1
- data/spec/controllers/anoubis/index_controller_spec.rb +1 -1
- data/spec/dummy/log/development.log +0 -0
- data/spec/dummy/log/test.log +0 -0
- data/spec/dummy/tmp/development_secret.txt +1 -0
- data/spec/models/anoubis/group_locale_spec.rb +1 -1
- data/spec/models/anoubis/group_menu_spec.rb +6 -6
- data/spec/models/anoubis/group_spec.rb +3 -3
- data/spec/models/anoubis/menu_locale_spec.rb +1 -1
- data/spec/models/anoubis/menu_spec.rb +1 -1
- data/spec/models/anoubis/system_locale_spec.rb +1 -1
- data/spec/models/anoubis/system_menu_spec.rb +5 -5
- data/spec/models/anoubis/system_spec.rb +4 -4
- data/spec/models/anoubis/tenant_spec.rb +4 -4
- data/spec/models/anoubis/user_spec.rb +2 -2
- metadata +62 -56
@@ -8,21 +8,21 @@ require_dependency "anubis/core/data/defaults"
|
|
8
8
|
require_dependency "anubis/core/data/convert"
|
9
9
|
require_dependency "anubis/core/data/callbacks"
|
10
10
|
|
11
|
-
module
|
11
|
+
module Anoubis
|
12
12
|
##
|
13
13
|
# Module presents all core functions for Anubis Library
|
14
14
|
module Core
|
15
15
|
##
|
16
16
|
# Controller consists all procedures and function for presents and modify models data.
|
17
|
-
class DataController <
|
18
|
-
include
|
19
|
-
include
|
20
|
-
include
|
21
|
-
include
|
22
|
-
include
|
23
|
-
include
|
24
|
-
include
|
25
|
-
include
|
17
|
+
class DataController < Anoubis::Core::ApplicationController
|
18
|
+
include Anoubis::Core::Data::Actions
|
19
|
+
include Anoubis::Core::Data::Load
|
20
|
+
include Anoubis::Core::Data::Get
|
21
|
+
include Anoubis::Core::Data::Set
|
22
|
+
include Anoubis::Core::Data::Setup
|
23
|
+
include Anoubis::Core::Data::Defaults
|
24
|
+
include Anoubis::Core::Data::Convert
|
25
|
+
include Anoubis::Core::Data::Callbacks
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require_dependency "anubis/output/login"
|
2
2
|
|
3
|
-
module
|
3
|
+
module Anoubis
|
4
4
|
module Core
|
5
5
|
##
|
6
6
|
# Module contains all procedures and function for {IndexController}. Consists of {Actions} and {Callbacks} module.
|
@@ -39,7 +39,7 @@ module Anubis
|
|
39
39
|
# "message": "Session expired"
|
40
40
|
# }
|
41
41
|
def logout
|
42
|
-
self.output =
|
42
|
+
self.output = Anoubis::Output::Basic.new
|
43
43
|
self.redis.del(self.redis_prefix + 'ses_'+self.token)
|
44
44
|
respond_to do |format|
|
45
45
|
format.json { render json: self.output.to_h }
|
@@ -2,13 +2,13 @@ require_dependency "anubis/core/application_controller"
|
|
2
2
|
require_dependency "anubis/core/index/actions"
|
3
3
|
require_dependency "anubis/core/index/callbacks"
|
4
4
|
|
5
|
-
module
|
5
|
+
module Anoubis
|
6
6
|
module Core
|
7
7
|
##
|
8
8
|
# Controller processes main system functions. Authenticates user, checks user access, outputs main menu and etc.
|
9
|
-
class IndexController <
|
10
|
-
include
|
11
|
-
include
|
9
|
+
class IndexController < Anoubis::Core::ApplicationController
|
10
|
+
include Anoubis::Core::Index::Actions
|
11
|
+
include Anoubis::Core::Index::Callbacks
|
12
12
|
|
13
13
|
##
|
14
14
|
# Check if authentication required
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Anoubis
|
2
2
|
module Etc
|
3
3
|
##
|
4
4
|
# Basic system variables class
|
@@ -6,27 +6,32 @@ module Anubis
|
|
6
6
|
# @!attribute [rw]
|
7
7
|
# @return [Data, nil] current loaded data or nil if data not loaded.
|
8
8
|
# @note In this attribute placed data when loaded from the model by actions 'table', 'edit', 'update', 'create' etc.
|
9
|
-
|
9
|
+
attr_accessor :data
|
10
10
|
|
11
11
|
# @!attribute [rw]
|
12
12
|
# @return [Menu, nil] menu information for current controller
|
13
13
|
# Returns menu information for current controller. By default sets to <i>nil</i>.
|
14
|
-
|
14
|
+
attr_accessor :menu
|
15
15
|
|
16
16
|
# @!attribute [rw]
|
17
17
|
# @return [TabItem, nil] tab information for current controller
|
18
18
|
# Returns tab information for current controller. By default sets to <i>nil</i>.
|
19
|
-
|
19
|
+
attr_accessor :tab
|
20
20
|
|
21
21
|
# @!attribute [rw]
|
22
22
|
# @return [String] current controller action.
|
23
23
|
# Returns current controller action. By default sets to controller action or ''.
|
24
|
-
|
24
|
+
attr_accessor :action
|
25
25
|
|
26
26
|
# @!attribute [rw]
|
27
27
|
# @return [Number] time of request.
|
28
28
|
# Returns time that was requested from client. By default sets to <i>0</i>.
|
29
|
-
|
29
|
+
attr_accessor :time
|
30
|
+
|
31
|
+
# @!attribute [rw] version
|
32
|
+
# @return [Number] Specifies the api version.
|
33
|
+
# Returns API version received from URL. By default sets to <i>0</i>.
|
34
|
+
attr_accessor :version
|
30
35
|
|
31
36
|
##
|
32
37
|
# Sets default system parameters
|
@@ -37,14 +42,14 @@ module Anubis
|
|
37
42
|
self.menu = nil
|
38
43
|
self.tab = nil
|
39
44
|
self.action = ''
|
45
|
+
self.time = 0
|
46
|
+
self.version = 0
|
47
|
+
|
40
48
|
|
41
49
|
if options.key? :params
|
42
50
|
self.action = options[:params][:action] if options[:params].key? :action
|
43
|
-
if options[:params].key? :time
|
44
|
-
|
45
|
-
else
|
46
|
-
self.time = 0
|
47
|
-
end
|
51
|
+
self.time = options[:params][:time].to_s.to_i if options[:params].key? :time
|
52
|
+
self.version = options[:params][:version].to_s.to_i if options[:params].key? :version
|
48
53
|
end
|
49
54
|
end
|
50
55
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Anoubis
|
2
2
|
module Etc
|
3
3
|
##
|
4
4
|
# Definitions of field options for table column or new (edit) form field.
|
@@ -62,7 +62,7 @@ module Anubis
|
|
62
62
|
class_attribute :options, default: nil
|
63
63
|
|
64
64
|
# @!attribute [rw]
|
65
|
-
# Describes if this field could return data for {
|
65
|
+
# Describes if this field could return data for {Anoubis::Data::Actions#autocomplete autocomplete} action.
|
66
66
|
# @return [Boolean] possibility for return data on autocomplete action.
|
67
67
|
#
|
68
68
|
# <b>Options:</b>
|
@@ -139,21 +139,21 @@ module Anubis
|
|
139
139
|
end
|
140
140
|
|
141
141
|
##
|
142
|
-
# Initialize additional parameters for {
|
142
|
+
# Initialize additional parameters for {Anoubis::Etc::Field#type 'string' field type} for controller actions.
|
143
143
|
# @param options [Hash] field's initial options
|
144
144
|
def initialize_string (options)
|
145
145
|
|
146
146
|
end
|
147
147
|
|
148
148
|
##
|
149
|
-
# Initialize additional parameters for {
|
149
|
+
# Initialize additional parameters for {Anoubis::Etc::Field#type 'boolean' field type} for controller actions.
|
150
150
|
# @param options [Hash] field's initial options
|
151
151
|
def initialize_boolean (options)
|
152
152
|
|
153
153
|
end
|
154
154
|
|
155
155
|
##
|
156
|
-
# Initialize additional parameters for {
|
156
|
+
# Initialize additional parameters for {Anoubis::Etc::Field#type 'number' field type} for controller actions.
|
157
157
|
# @param options [Hash] field's initial options
|
158
158
|
def initialize_number (options)
|
159
159
|
if options.key? :error_text
|
@@ -167,21 +167,21 @@ module Anubis
|
|
167
167
|
end
|
168
168
|
|
169
169
|
##
|
170
|
-
# Initialize additional parameters for {
|
170
|
+
# Initialize additional parameters for {Anoubis::Etc::Field#type 'text' field type} for controller actions.
|
171
171
|
# @param options [Hash] field's initial options
|
172
172
|
def initialize_text (options)
|
173
173
|
|
174
174
|
end
|
175
175
|
|
176
176
|
##
|
177
|
-
# Initialize additional parameters for {
|
177
|
+
# Initialize additional parameters for {Anoubis::Etc::Field#type 'html' field type} for controller actions.
|
178
178
|
# @param options [Hash] field's initial options
|
179
179
|
def initialize_html (options)
|
180
180
|
|
181
181
|
end
|
182
182
|
|
183
183
|
##
|
184
|
-
# Initialize additional parameters for {
|
184
|
+
# Initialize additional parameters for {Anoubis::Etc::Field#type 'datetime' field type} for controller actions.
|
185
185
|
# @param options [Hash] field's initial options
|
186
186
|
def initialize_datetime (options)
|
187
187
|
options[:format] = 'datetime' if !options.key? :format
|
@@ -190,7 +190,7 @@ module Anubis
|
|
190
190
|
end
|
191
191
|
|
192
192
|
##
|
193
|
-
# Setups additional parameters for {
|
193
|
+
# Setups additional parameters for {Anoubis::Etc::Field#type 'listbox' field type} for controller actions.
|
194
194
|
# @param options [Hash] field's initial options
|
195
195
|
def initialize_listbox (options)
|
196
196
|
self.options = FieldOptions.new if !self.options
|
@@ -220,7 +220,7 @@ module Anubis
|
|
220
220
|
end
|
221
221
|
|
222
222
|
##
|
223
|
-
# Initialize additional parameters for {
|
223
|
+
# Initialize additional parameters for {Anoubis::Etc::Field#type 'key' field type} for controller actions.
|
224
224
|
# @param options [Hash] field's initial options
|
225
225
|
def initialize_key (options)
|
226
226
|
if self.model
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Anoubis
|
2
2
|
module Etc
|
3
3
|
##
|
4
4
|
# Definitions of filter options for data.
|
@@ -20,7 +20,7 @@ module Anubis
|
|
20
20
|
|
21
21
|
# @!attribute [rw]
|
22
22
|
# Defines reference for fields
|
23
|
-
# @return [Hash<
|
23
|
+
# @return [Hash<Anoubis::Etc::Field>] hash of fields
|
24
24
|
class_attribute :fields, default: nil
|
25
25
|
|
26
26
|
##
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Anoubis
|
2
2
|
module Etc
|
3
3
|
##
|
4
4
|
# Class stores main menu parameters and variables
|
@@ -83,7 +83,7 @@ module Anubis
|
|
83
83
|
self.state = options[:state] if options.has_key? :state
|
84
84
|
self.access = options[:access] if options.has_key? :access
|
85
85
|
end
|
86
|
-
if options.class ==
|
86
|
+
if options.class == Anoubis::Sso::Client::Menu
|
87
87
|
self.title = options.title
|
88
88
|
self.page_title = options.page_title
|
89
89
|
self.short_title = options.short_title
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module Anoubis
|
2
2
|
module Output
|
3
3
|
##
|
4
4
|
# Output subclass that represents data for frame action
|
@@ -16,11 +16,11 @@ module Anubis
|
|
16
16
|
class_attribute :access
|
17
17
|
|
18
18
|
# @!attribute [rw] tab_items
|
19
|
-
# @return [Array] the array of tab elements {
|
19
|
+
# @return [Array] the array of tab elements {Anoubis::Output::TabItem}.
|
20
20
|
class_attribute :tab_items
|
21
21
|
|
22
22
|
# @!attribute [rw] tabs
|
23
|
-
# @return [Hash] the hash of menu elements {
|
23
|
+
# @return [Hash] the hash of menu elements {Anoubis::Output::TabItem} with 'mode' as a key.
|
24
24
|
class_attribute :tabs
|
25
25
|
|
26
26
|
##
|
@@ -80,11 +80,11 @@ module Anubis
|
|
80
80
|
class_attribute :hint
|
81
81
|
|
82
82
|
# @!attribute [rw] button_items
|
83
|
-
# @return [Array] the array of tab elements {
|
83
|
+
# @return [Array] the array of tab elements {Anoubis::Output::FrameButtonItem}.
|
84
84
|
class_attribute :button_items
|
85
85
|
|
86
86
|
# @!attribute [rw] buttons
|
87
|
-
# @return [Hash] the hash of menu elements {
|
87
|
+
# @return [Hash] the hash of menu elements {Anoubis::Output::FrameButtonItem} with 'key' as a key.
|
88
88
|
class_attribute :buttons
|
89
89
|
|
90
90
|
# @!attribute [rw] filter
|
@@ -1,14 +1,14 @@
|
|
1
|
-
module
|
1
|
+
module Anoubis
|
2
2
|
module Output
|
3
3
|
##
|
4
4
|
# Output subclass that represents data for menu action
|
5
5
|
class Menu < Basic
|
6
6
|
# @!attribute [rw] items
|
7
|
-
# @return [Array] the array of menu elements {
|
7
|
+
# @return [Array] the array of menu elements {Anoubis::Output::MenuItem}.
|
8
8
|
class_attribute :items
|
9
9
|
|
10
10
|
# @!attribute [rw] keys
|
11
|
-
# @return [Hash] the hash of menu elements {
|
11
|
+
# @return [Hash] the hash of menu elements {Anoubis::Output::MenuItem} with 'mode' as a key.
|
12
12
|
class_attribute :keys
|
13
13
|
|
14
14
|
# @!attribute [rw] user
|
@@ -1,4 +1,4 @@
|
|
1
|
-
class
|
1
|
+
class Anoubis::Sso::Client::ApplicationController < Anoubis::Core::ApplicationController
|
2
2
|
|
3
3
|
def sso_server
|
4
4
|
Rails.configuration.sso_server
|
@@ -16,7 +16,7 @@ class Anubis::Sso::Client::ApplicationController < Anubis::Core::ApplicationCont
|
|
16
16
|
begin
|
17
17
|
model = Rails.configuration.user_model.classify.constantize
|
18
18
|
rescue
|
19
|
-
model =
|
19
|
+
model = Anoubis::Sso::Server::User
|
20
20
|
end
|
21
21
|
|
22
22
|
model
|
@@ -1,20 +1,20 @@
|
|
1
1
|
##
|
2
|
-
# Module loads data from external sources for {
|
3
|
-
module
|
4
|
-
include
|
2
|
+
# Module loads data from external sources for {Anoubis::Sso::Client::DataController}
|
3
|
+
module Anoubis::Sso::Client::Data::Load
|
4
|
+
include Anoubis::Core::Data::Load
|
5
5
|
|
6
6
|
def load_menu_data
|
7
7
|
menu_json = self.redis.get(self.redis_prefix + 'menu:' + params[:controller])
|
8
8
|
|
9
9
|
unless menu_json
|
10
|
-
menu =
|
10
|
+
menu = Anoubis::Sso::Client::Menu.where(mode: params[:controller], status: 'enabled').first
|
11
11
|
self.redis.set(self.redis_prefix + 'menu:'+ params[:controller], menu.to_json) if menu
|
12
12
|
else
|
13
|
-
menu =
|
13
|
+
menu = Anoubis::Sso::Client::Menu.new(JSON.parse(menu_json, { :symbolize_names => true }))
|
14
14
|
end
|
15
15
|
|
16
16
|
if menu
|
17
|
-
self.etc.menu =
|
17
|
+
self.etc.menu = Anoubis::Etc::Menu.new menu
|
18
18
|
|
19
19
|
if self.writer
|
20
20
|
self.etc.menu.access = 'write'
|
@@ -9,13 +9,13 @@ require_dependency "anubis/sso/client/data/convert"
|
|
9
9
|
require_dependency "anubis/sso/client/data/callbacks"
|
10
10
|
|
11
11
|
# Controller consists all procedures and function for presents and modify models data.
|
12
|
-
class
|
13
|
-
include
|
14
|
-
include
|
15
|
-
include
|
16
|
-
include
|
17
|
-
include
|
18
|
-
include
|
19
|
-
include
|
20
|
-
include
|
12
|
+
class Anoubis::Sso::Client::DataController < Anoubis::Sso::Client::ApplicationController
|
13
|
+
include Anoubis::Sso::Client::Data::Actions
|
14
|
+
include Anoubis::Sso::Client::Data::Load
|
15
|
+
include Anoubis::Sso::Client::Data::Get
|
16
|
+
include Anoubis::Sso::Client::Data::Set
|
17
|
+
include Anoubis::Sso::Client::Data::Setup
|
18
|
+
include Anoubis::Sso::Client::Data::Defaults
|
19
|
+
include Anoubis::Sso::Client::Data::Convert
|
20
|
+
include Anoubis::Sso::Client::Data::Callbacks
|
21
21
|
end
|
@@ -1,6 +1,6 @@
|
|
1
|
-
module
|
1
|
+
module Anoubis::Sso::Client::Index::Actions
|
2
2
|
def menu
|
3
|
-
self.output =
|
3
|
+
self.output = Anoubis::Output::Menu.new
|
4
4
|
|
5
5
|
if self.current_user
|
6
6
|
self.output.user = {
|
@@ -10,7 +10,7 @@ module Anubis::Sso::Client::Index::Actions
|
|
10
10
|
}
|
11
11
|
end
|
12
12
|
|
13
|
-
access =
|
13
|
+
access = Anoubis::Sso::Client::GroupMenu.accesses[:read].to_s+','+Anoubis::Sso::Client::GroupMenu.accesses[:write].to_s
|
14
14
|
query = <<-SQL
|
15
15
|
SELECT `t`.* FROM
|
16
16
|
(
|
@@ -32,7 +32,7 @@ module Anubis::Sso::Client::Index::Actions
|
|
32
32
|
)
|
33
33
|
ORDER BY `t`.`menu_id`, `t`.`position`
|
34
34
|
SQL
|
35
|
-
|
35
|
+
Anoubis::Sso::Client::GroupMenu.find_by_sql(query).each do |data|
|
36
36
|
self.output.addElement({
|
37
37
|
mode: data.mode,
|
38
38
|
title: data.title,
|
@@ -42,7 +42,7 @@ module Anubis::Sso::Client::Index::Actions
|
|
42
42
|
tab: data.tab,
|
43
43
|
action: data.action,
|
44
44
|
access: data.access,
|
45
|
-
state:
|
45
|
+
state: Anoubis::Sso::Client::Menu.states.invert[data.state],
|
46
46
|
parent: data.parent_mode
|
47
47
|
})
|
48
48
|
#self.output[:data].push menu_id[data.id.to_s.to_sym]
|
@@ -56,7 +56,7 @@ module Anubis::Sso::Client::Index::Actions
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def logout
|
59
|
-
self.output =
|
59
|
+
self.output = Anoubis::Output::Basic.new
|
60
60
|
self.output.result = 0
|
61
61
|
|
62
62
|
begin
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require_dependency "anubis/sso/client/index/actions"
|
2
2
|
require_dependency "anubis/sso/client/index/callbacks"
|
3
3
|
|
4
|
-
class
|
5
|
-
include
|
6
|
-
include
|
4
|
+
class Anoubis::Sso::Client::IndexController < Anoubis::Sso::Client::ApplicationController
|
5
|
+
include Anoubis::Sso::Client::Index::Actions
|
6
|
+
include Anoubis::Sso::Client::Index::Callbacks
|
7
7
|
|
8
8
|
##
|
9
9
|
# Check if authentication required
|
@@ -1,9 +1,9 @@
|
|
1
|
-
class
|
1
|
+
class Anoubis::Sso::Server::ApplicationController < Anoubis::Core::ApplicationController
|
2
2
|
def user_model
|
3
3
|
begin
|
4
4
|
model = Rails.configuration.user_model.classify.constantize
|
5
5
|
rescue
|
6
|
-
model =
|
6
|
+
model = Anoubis::Sso::Server::User
|
7
7
|
end
|
8
8
|
|
9
9
|
model
|