anoubis 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (97) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/anoubis/application_controller.rb +18 -6
  3. data/app/controllers/anoubis/core/application_controller.rb +6 -6
  4. data/app/controllers/anoubis/core/data/actions.rb +15 -15
  5. data/app/controllers/anoubis/core/data/callbacks.rb +5 -5
  6. data/app/controllers/anoubis/core/data/convert.rb +33 -33
  7. data/app/controllers/anoubis/core/data/defaults.rb +8 -8
  8. data/app/controllers/anoubis/core/data/get.rb +14 -14
  9. data/app/controllers/anoubis/core/data/load.rb +3 -3
  10. data/app/controllers/anoubis/core/data/set.rb +2 -2
  11. data/app/controllers/anoubis/core/data/setup.rb +5 -5
  12. data/app/controllers/anoubis/core/data_controller.rb +10 -10
  13. data/app/controllers/anoubis/core/index/actions.rb +2 -2
  14. data/app/controllers/anoubis/core/index/callbacks.rb +1 -1
  15. data/app/controllers/anoubis/core/index_controller.rb +4 -4
  16. data/app/controllers/anoubis/etc/base.rb +16 -11
  17. data/app/controllers/anoubis/etc/data.rb +1 -1
  18. data/app/controllers/anoubis/etc/field.rb +10 -10
  19. data/app/controllers/anoubis/etc/field_options.rb +1 -1
  20. data/app/controllers/anoubis/etc/field_order.rb +1 -1
  21. data/app/controllers/anoubis/etc/filter.rb +2 -2
  22. data/app/controllers/anoubis/etc/menu.rb +2 -2
  23. data/app/controllers/anoubis/etc/model.rb +1 -1
  24. data/app/controllers/anoubis/etc/tab_item.rb +1 -1
  25. data/app/controllers/anoubis/etc.rb +1 -1
  26. data/app/controllers/anoubis/export.rb +1 -1
  27. data/app/controllers/anoubis/output/autocomplete.rb +1 -1
  28. data/app/controllers/anoubis/output/basic.rb +1 -1
  29. data/app/controllers/anoubis/output/data.rb +1 -1
  30. data/app/controllers/anoubis/output/delete.rb +1 -1
  31. data/app/controllers/anoubis/output/edit.rb +1 -1
  32. data/app/controllers/anoubis/output/frame.rb +5 -5
  33. data/app/controllers/anoubis/output/login.rb +1 -1
  34. data/app/controllers/anoubis/output/menu.rb +3 -3
  35. data/app/controllers/anoubis/output/update.rb +1 -1
  36. data/app/controllers/anoubis/sso/client/application_controller.rb +2 -2
  37. data/app/controllers/anoubis/sso/client/data/actions.rb +2 -2
  38. data/app/controllers/anoubis/sso/client/data/callbacks.rb +2 -2
  39. data/app/controllers/anoubis/sso/client/data/convert.rb +2 -2
  40. data/app/controllers/anoubis/sso/client/data/defaults.rb +2 -2
  41. data/app/controllers/anoubis/sso/client/data/get.rb +2 -2
  42. data/app/controllers/anoubis/sso/client/data/load.rb +6 -6
  43. data/app/controllers/anoubis/sso/client/data/set.rb +2 -2
  44. data/app/controllers/anoubis/sso/client/data/setup.rb +2 -2
  45. data/app/controllers/anoubis/sso/client/data_controller.rb +9 -9
  46. data/app/controllers/anoubis/sso/client/index/actions.rb +6 -6
  47. data/app/controllers/anoubis/sso/client/index/callbacks.rb +1 -1
  48. data/app/controllers/anoubis/sso/client/index_controller.rb +3 -3
  49. data/app/controllers/anoubis/sso/server/application_controller.rb +2 -2
  50. data/app/controllers/anoubis/sso/server/login_controller.rb +1 -1
  51. data/app/controllers/anoubis/sso/server/user_controller.rb +1 -1
  52. data/app/controllers/anoubis/tenant/application_controller.rb +4 -4
  53. data/app/controllers/anoubis/tenant/data/actions.rb +2 -2
  54. data/app/controllers/anoubis/tenant/data/callbacks.rb +2 -2
  55. data/app/controllers/anoubis/tenant/data/convert.rb +2 -2
  56. data/app/controllers/anoubis/tenant/data/defaults.rb +2 -2
  57. data/app/controllers/anoubis/tenant/data/get.rb +2 -2
  58. data/app/controllers/anoubis/tenant/data/load.rb +5 -5
  59. data/app/controllers/anoubis/tenant/data/set.rb +2 -2
  60. data/app/controllers/anoubis/tenant/data/setup.rb +2 -2
  61. data/app/controllers/anoubis/tenant/data_controller.rb +10 -10
  62. data/app/controllers/anoubis/tenant/index/actions.rb +15 -15
  63. data/app/controllers/anoubis/tenant/index/callbacks.rb +2 -2
  64. data/app/controllers/anoubis/tenant/index_controller.rb +4 -4
  65. data/app/controllers/anoubis/tenants_controller.rb +1 -1
  66. data/app/controllers/anoubis/users_controller.rb +1 -1
  67. data/app/models/anoubis/application_record.rb +2 -2
  68. data/app/models/anoubis/core/application_record.rb +3 -3
  69. data/app/models/anoubis/sso/client/group_menu.rb +6 -6
  70. data/app/models/anoubis/sso/client/menu.rb +8 -8
  71. data/app/models/anoubis/sso/client/user.rb +3 -3
  72. data/app/models/anoubis/sso/server/user.rb +1 -1
  73. data/app/models/anoubis/tenant/group_menu.rb +5 -5
  74. data/app/models/anoubis/tenant/menu.rb +13 -13
  75. data/app/models/anoubis/tenant/system.rb +5 -5
  76. data/app/models/anoubis/tenant/user.rb +4 -4
  77. data/app/services/anoubis/session_service.rb +1 -1
  78. data/config/locales/en.yml +17 -2
  79. data/config/locales/ru.yml +18 -3
  80. data/db/seeds.rb +30 -30
  81. data/lib/anoubis/version.rb +1 -1
  82. data/lib/anoubis.rb +1 -1
  83. data/spec/controllers/anoubis/index_controller_spec.rb +1 -1
  84. data/spec/dummy/log/development.log +0 -0
  85. data/spec/dummy/log/test.log +0 -0
  86. data/spec/dummy/tmp/development_secret.txt +1 -0
  87. data/spec/models/anoubis/group_locale_spec.rb +1 -1
  88. data/spec/models/anoubis/group_menu_spec.rb +6 -6
  89. data/spec/models/anoubis/group_spec.rb +3 -3
  90. data/spec/models/anoubis/menu_locale_spec.rb +1 -1
  91. data/spec/models/anoubis/menu_spec.rb +1 -1
  92. data/spec/models/anoubis/system_locale_spec.rb +1 -1
  93. data/spec/models/anoubis/system_menu_spec.rb +5 -5
  94. data/spec/models/anoubis/system_spec.rb +4 -4
  95. data/spec/models/anoubis/tenant_spec.rb +4 -4
  96. data/spec/models/anoubis/user_spec.rb +2 -2
  97. 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 Anubis
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 < Anubis::Core::ApplicationController
18
- include Anubis::Core::Data::Actions
19
- include Anubis::Core::Data::Load
20
- include Anubis::Core::Data::Get
21
- include Anubis::Core::Data::Set
22
- include Anubis::Core::Data::Setup
23
- include Anubis::Core::Data::Defaults
24
- include Anubis::Core::Data::Convert
25
- include Anubis::Core::Data::Callbacks
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 Anubis
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 = Anubis::Output::Basic.new
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 }
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  module Core
3
3
  ##
4
4
  # Module contains all procedures and function for {IndexController}. Consists of {Actions} and {Callbacks} module.
@@ -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 Anubis
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 < Anubis::Core::ApplicationController
10
- include Anubis::Core::Index::Actions
11
- include Anubis::Core::Index::Callbacks
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 Anubis
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
- class_attribute :data
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
- class_attribute :menu, default: nil
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
- class_attribute :tab, default: nil
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
- class_attribute :action, default: ''
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
- class_attribute :time, default: 0
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
- self.time = options[:params][:time].to_s.to_i
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 Anubis
1
+ module Anoubis
2
2
  module Etc
3
3
  ##
4
4
  # Class stores data information for current controller
@@ -1,4 +1,4 @@
1
- module Anubis
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 {Anubis::Data::Actions#autocomplete autocomplete} action.
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 {Anubis::Etc::Field#type 'string' field type} for controller actions.
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 {Anubis::Etc::Field#type 'boolean' field type} for controller actions.
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 {Anubis::Etc::Field#type 'number' field type} for controller actions.
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 {Anubis::Etc::Field#type 'text' field type} for controller actions.
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 {Anubis::Etc::Field#type 'html' field type} for controller actions.
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 {Anubis::Etc::Field#type 'datetime' field type} for controller actions.
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 {Anubis::Etc::Field#type 'listbox' field type} for controller actions.
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 {Anubis::Etc::Field#type 'key' field type} for controller actions.
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 Anubis
1
+ module Anoubis
2
2
  module Etc
3
3
  ##
4
4
  # Definitions of fields options list for 'checkbox' and 'listbox' type.
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  module Etc
3
3
  ##
4
4
  # Definitions of fields order.
@@ -1,4 +1,4 @@
1
- module Anubis
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<Anubis::Etc::Field>] hash of fields
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 Anubis
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 == Anubis::Sso::Client::Menu
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 Anubis
1
+ module Anoubis
2
2
  module Etc
3
3
  ##
4
4
  # Definitions of model options. Class is used for define attached model.
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  module Etc
3
3
  ##
4
4
  # Definitions of tab options.
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  ##
3
3
  # Module stores systems variables and functions. Module consists of {Base}, {Data}, {Field}, {FieldOptions},
4
4
  # {Menu}, {Model} and {TabItem} classes.
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  class Export
3
3
  class_attribute :data
4
4
  class_attribute :title
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  module Output
3
3
  ##
4
4
  # Output subclass that represents data for edit(new) action
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  ##
3
3
  # Module contains all procedures and function for output data. Module consists from {Basic}, {Frame}, {Login} and
4
4
  # {Menu} classes.
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  module Output
3
3
  ##
4
4
  # Output subclass that represents data for default index action
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  module Output
3
3
  ##
4
4
  # Output subclass that represents data for destroy action
@@ -1,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  module Output
3
3
  ##
4
4
  # Output subclass that represents data for edit(new) action
@@ -1,4 +1,4 @@
1
- module Anubis
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 {Anubis::Output::TabItem}.
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 {Anubis::Output::TabItem} with 'mode' as a key.
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 {Anubis::Output::FrameButtonItem}.
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 {Anubis::Output::FrameButtonItem} with 'key' as a key.
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,4 +1,4 @@
1
- module Anubis
1
+ module Anoubis
2
2
  module Output
3
3
  ##
4
4
  # Output subclass that represents data for login action
@@ -1,14 +1,14 @@
1
- module Anubis
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 {Anubis::Output::MenuItem}.
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 {Anubis::Output::MenuItem} with 'mode' as a key.
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
- module Anubis
1
+ module Anoubis
2
2
  module Output
3
3
  ##
4
4
  # Output subclass that represents data for update or create action
@@ -1,4 +1,4 @@
1
- class Anubis::Sso::Client::ApplicationController < Anubis::Core::ApplicationController
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 = Anubis::Sso::Server::User
19
+ model = Anoubis::Sso::Server::User
20
20
  end
21
21
 
22
22
  model
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Module presents all default actions for for {DataController}.
3
- module Anubis::Sso::Client::Data::Actions
4
- include Anubis::Core::Data::Actions
3
+ module Anoubis::Sso::Client::Data::Actions
4
+ include Anoubis::Core::Data::Actions
5
5
  end
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Module presents all callbacks called in actions.
3
- module Anubis::Sso::Client::Data::Callbacks
4
- include Anubis::Core::Data::Callbacks
3
+ module Anoubis::Sso::Client::Data::Callbacks
4
+ include Anoubis::Core::Data::Callbacks
5
5
  end
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Data conversion moule between database and human representation
3
- module Anubis::Sso::Client::Data::Convert
4
- include Anubis::Core::Data::Convert
3
+ module Anoubis::Sso::Client::Data::Convert
4
+ include Anoubis::Core::Data::Convert
5
5
  end
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Module sets default parameters for {DataController}.
3
- module Anubis::Sso::Client::Data::Defaults
4
- include Anubis::Core::Data::Defaults
3
+ module Anoubis::Sso::Client::Data::Defaults
4
+ include Anoubis::Core::Data::Defaults
5
5
  end
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Module gets system data for {DataController}
3
- module Anubis::Sso::Client::Data::Get
4
- include Anubis::Core::Data::Get
3
+ module Anoubis::Sso::Client::Data::Get
4
+ include Anoubis::Core::Data::Get
5
5
  end
@@ -1,20 +1,20 @@
1
1
  ##
2
- # Module loads data from external sources for {Anubis::Sso::Client::DataController}
3
- module Anubis::Sso::Client::Data::Load
4
- include Anubis::Core::Data::Load
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 = Anubis::Sso::Client::Menu.where(mode: params[:controller], status: 'enabled').first
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 = Anubis::Sso::Client::Menu.new(JSON.parse(menu_json, { :symbolize_names => true }))
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 = Anubis::Etc::Menu.new menu
17
+ self.etc.menu = Anoubis::Etc::Menu.new menu
18
18
 
19
19
  if self.writer
20
20
  self.etc.menu.access = 'write'
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Module sets system data for {DataController}
3
- module Anubis::Sso::Client::Data::Set
4
- include Anubis::Core::Data::Set
3
+ module Anoubis::Sso::Client::Data::Set
4
+ include Anoubis::Core::Data::Set
5
5
  end
@@ -1,5 +1,5 @@
1
1
  ##
2
2
  # Module setups system parameters for {DataController}
3
- module Anubis::Sso::Client::Data::Setup
4
- include Anubis::Core::Data::Setup
3
+ module Anoubis::Sso::Client::Data::Setup
4
+ include Anoubis::Core::Data::Setup
5
5
  end
@@ -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 Anubis::Sso::Client::DataController < Anubis::Sso::Client::ApplicationController
13
- include Anubis::Sso::Client::Data::Actions
14
- include Anubis::Sso::Client::Data::Load
15
- include Anubis::Sso::Client::Data::Get
16
- include Anubis::Sso::Client::Data::Set
17
- include Anubis::Sso::Client::Data::Setup
18
- include Anubis::Sso::Client::Data::Defaults
19
- include Anubis::Sso::Client::Data::Convert
20
- include Anubis::Sso::Client::Data::Callbacks
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 Anubis::Sso::Client::Index::Actions
1
+ module Anoubis::Sso::Client::Index::Actions
2
2
  def menu
3
- self.output = Anubis::Output::Menu.new
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 = Anubis::Sso::Client::GroupMenu.accesses[:read].to_s+','+Anubis::Sso::Client::GroupMenu.accesses[:write].to_s
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
- Anubis::Sso::Client::GroupMenu.find_by_sql(query).each do |data|
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: Anubis::Sso::Client::Menu.states.invert[data.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 = Anubis::Output::Basic.new
59
+ self.output = Anoubis::Output::Basic.new
60
60
  self.output.result = 0
61
61
 
62
62
  begin
@@ -1,4 +1,4 @@
1
- module Anubis::Sso::Client::Index::Callbacks
1
+ module Anoubis::Sso::Client::Index::Callbacks
2
2
  ##
3
3
  # Calls before menu output data.
4
4
  def before_menu_output
@@ -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 Anubis::Sso::Client::IndexController < Anubis::Sso::Client::ApplicationController
5
- include Anubis::Sso::Client::Index::Actions
6
- include Anubis::Sso::Client::Index::Callbacks
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 Anubis::Sso::Server::ApplicationController < Anubis::Core::ApplicationController
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 = Anubis::Sso::Server::User
6
+ model = Anoubis::Sso::Server::User
7
7
  end
8
8
 
9
9
  model
@@ -1,4 +1,4 @@
1
- class Anubis::Sso::Server::LoginController < Anubis::Sso::Server::ApplicationController
1
+ class Anoubis::Sso::Server::LoginController < Anoubis::Sso::Server::ApplicationController
2
2
  include ActionController::Cookies
3
3
 
4
4
  def authenticate?
@@ -1,4 +1,4 @@
1
- class Anubis::Sso::Server::UserController < Anubis::Sso::Server::ApplicationController
1
+ class Anoubis::Sso::Server::UserController < Anoubis::Sso::Server::ApplicationController
2
2
  def authenticate?
3
3
  false
4
4
  end