hippo-fw 0.9.7 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc.js +0 -3
  3. data/.nvmrc +1 -2
  4. data/.ruby-version +1 -1
  5. data/Rakefile +1 -1
  6. data/client/hippo/access/login-dialog.jsx +2 -0
  7. data/client/hippo/boot.jsx +12 -0
  8. data/client/hippo/components/asset.jsx +5 -1
  9. data/client/hippo/components/asset.scss +1 -0
  10. data/client/hippo/components/data-list.jsx +6 -4
  11. data/client/hippo/components/data-table.jsx +7 -6
  12. data/client/hippo/components/data-table/header-cell.jsx +2 -0
  13. data/client/hippo/components/date-time.jsx +12 -2
  14. data/client/hippo/components/form/api.js +12 -0
  15. data/client/hippo/components/form/fields.jsx +8 -1
  16. data/client/hippo/components/form/fields/checkbox-wrapper.jsx +2 -0
  17. data/client/hippo/components/form/fields/date-wrapper.jsx +2 -0
  18. data/client/hippo/components/form/fields/form-field.scss +2 -0
  19. data/client/hippo/components/form/fields/label.jsx +2 -0
  20. data/client/hippo/components/form/fields/react-tags.scss +170 -0
  21. data/client/hippo/components/form/fields/select-wrapper.jsx +2 -0
  22. data/client/hippo/components/form/fields/tags-wrapper.jsx +46 -0
  23. data/client/hippo/components/form/fields/text-wrapper.jsx +9 -1
  24. data/client/hippo/components/form/fields/textarea-wrapper.jsx +15 -0
  25. data/client/hippo/components/form/wrapper.jsx +21 -1
  26. data/client/hippo/components/help.jsx +21 -0
  27. data/client/hippo/components/master-detail.jsx +2 -0
  28. data/client/hippo/components/network-activity-overlay.jsx +3 -1
  29. data/client/hippo/components/popout-window.jsx +126 -0
  30. data/client/hippo/components/query-builder.jsx +9 -117
  31. data/client/hippo/components/query-builder/boolean-picker.jsx +28 -0
  32. data/client/hippo/components/query-builder/clause-filter.jsx +58 -0
  33. data/client/hippo/components/query-builder/clause.jsx +98 -0
  34. data/client/hippo/components/query-builder/date-picker.jsx +23 -0
  35. data/client/hippo/components/query-builder/query-builder.scss +7 -0
  36. data/client/hippo/components/record-finder.jsx +2 -0
  37. data/client/hippo/components/record-finder/query-layer.jsx +5 -1
  38. data/client/hippo/components/save-button.jsx +7 -1
  39. data/client/hippo/components/screen.jsx +2 -0
  40. data/client/hippo/components/text-editor.jsx +4 -5
  41. data/client/hippo/components/text-editor/display-modes/Button.jsx +5 -2
  42. data/client/hippo/components/text-editor/display-modes/ToggleEdit.jsx +2 -1
  43. data/client/hippo/components/text-editor/display-modes/ToggleInsert.jsx +2 -1
  44. data/client/hippo/components/text-editor/display-modes/ToggleLayout.jsx +2 -1
  45. data/client/hippo/components/text-editor/display-modes/TogglePreview.jsx +2 -1
  46. data/client/hippo/components/text-editor/display-modes/ToggleResize.jsx +2 -1
  47. data/client/hippo/components/text-editor/display-modes/index.js +7 -7
  48. data/client/hippo/components/text-editor/image-plugin/Component/Display/index.js +4 -2
  49. data/client/hippo/components/text-editor/image-plugin/Component/Form/index.js +2 -0
  50. data/client/hippo/components/text-editor/renderer.jsx +2 -0
  51. data/client/hippo/components/text-editor/text-editor.scss +13 -4
  52. data/client/hippo/components/time-zone-select.jsx +2 -0
  53. data/client/hippo/components/tool-tip.jsx +2 -0
  54. data/client/hippo/extensions/base.js +2 -0
  55. data/client/hippo/extensions/hippo.js +2 -0
  56. data/client/hippo/lib/__mocks__/request-assets.js +1 -2
  57. data/client/hippo/lib/bootstrap.js +2 -0
  58. data/client/hippo/lib/computed-properties.js +24 -0
  59. data/client/hippo/lib/date-range.js +13 -2
  60. data/client/hippo/lib/request-assets.js +3 -2
  61. data/client/hippo/lib/smooth-scroll.js +2 -0
  62. data/client/hippo/lib/util.js +1 -2
  63. data/client/hippo/models/asset.js +2 -0
  64. data/client/hippo/models/base.js +5 -2
  65. data/client/hippo/models/collection.js +2 -0
  66. data/client/hippo/models/config.js +3 -1
  67. data/client/hippo/models/pub_sub.js +2 -0
  68. data/client/hippo/models/pub_sub/channel.js +2 -0
  69. data/client/hippo/models/pub_sub/map.js +2 -0
  70. data/client/hippo/models/query.js +21 -12
  71. data/client/hippo/models/query/array-result.js +52 -16
  72. data/client/hippo/models/query/clause.js +11 -4
  73. data/client/hippo/models/query/field.js +2 -1
  74. data/client/hippo/models/query/info.js +7 -1
  75. data/client/hippo/models/query/operator.js +2 -0
  76. data/client/hippo/models/query/result.js +2 -0
  77. data/client/hippo/models/query/types.js +4 -0
  78. data/client/hippo/models/sync.js +2 -0
  79. data/client/hippo/models/system-setting.js +1 -15
  80. data/client/hippo/models/tenant.js +23 -7
  81. data/client/hippo/react/Root.jsx +2 -0
  82. data/client/hippo/react/component-not-found.jsx +2 -0
  83. data/client/hippo/screens/definition.js +2 -0
  84. data/client/hippo/screens/group.js +2 -0
  85. data/client/hippo/screens/instance.js +5 -1
  86. data/client/hippo/screens/system-settings.jsx +19 -5
  87. data/client/hippo/screens/system-settings/mailer-config.jsx +4 -2
  88. data/client/hippo/screens/system-settings/system-settings.scss +1 -1
  89. data/client/hippo/screens/system-settings/tenant.jsx +4 -2
  90. data/client/hippo/screens/user-management.jsx +2 -0
  91. data/client/hippo/screens/user-management/edit-form.jsx +2 -0
  92. data/client/hippo/testing/screens.js +10 -2
  93. data/client/hippo/user.js +4 -0
  94. data/client/hippo/workspace/index.jsx +3 -1
  95. data/client/hippo/workspace/menu-group.jsx +2 -0
  96. data/client/hippo/workspace/menu-option.jsx +2 -0
  97. data/client/hippo/workspace/menu.jsx +6 -3
  98. data/client/hippo/workspace/navbar.jsx +2 -0
  99. data/client/hippo/workspace/screen.jsx +2 -0
  100. data/client/hippo/workspace/styles.scss +5 -1
  101. data/command-reference-files/initial/.eslintrc.js +0 -3
  102. data/command-reference-files/initial/Gemfile +1 -1
  103. data/config/routes.rb +3 -1
  104. data/db/seed.rb +1 -1
  105. data/hippo-fw.gemspec +2 -2
  106. data/lib/hippo/api/controller_base.rb +2 -1
  107. data/lib/hippo/api/handlers/asset.rb +3 -2
  108. data/lib/hippo/api/handlers/tenant.rb +4 -6
  109. data/lib/hippo/api/helper_methods.rb +5 -7
  110. data/lib/hippo/api/route_set.rb +3 -2
  111. data/lib/hippo/asset.rb +4 -0
  112. data/lib/hippo/command/console.rb +1 -1
  113. data/lib/hippo/concerns/asset_uploader.rb +9 -4
  114. data/lib/hippo/concerns/queries.rb +3 -3
  115. data/lib/hippo/extension.rb +14 -4
  116. data/lib/hippo/extension/definition.rb +5 -1
  117. data/lib/hippo/logger.rb +26 -27
  118. data/lib/hippo/mailer.rb +19 -7
  119. data/lib/hippo/system_settings.rb +10 -4
  120. data/lib/hippo/templates/liquid.rb +1 -0
  121. data/lib/hippo/templates/liquid/pluralize.rb +16 -0
  122. data/lib/hippo/tenant.rb +17 -1
  123. data/lib/hippo/user.rb +10 -9
  124. data/lib/hippo/version.rb +1 -1
  125. data/lib/hippo/webpack.rb +22 -2
  126. data/package-lock.json +5462 -883
  127. data/package.json +9 -11
  128. data/spec/client/access/login-dialog.spec.jsx +2 -2
  129. data/spec/client/components/__snapshots__/query-builder.spec.jsx.snap +1 -1
  130. data/spec/client/components/__snapshots__/record-finder.spec.jsx.snap +1 -1
  131. data/spec/client/components/master-detail.spec.jsx +2 -1
  132. data/spec/client/components/query-builder.spec.jsx +3 -3
  133. data/spec/client/extension/base.spec.js +2 -0
  134. data/spec/client/models/base.spec.js +5 -3
  135. data/spec/client/models/query.spec.js +18 -6
  136. data/spec/client/models/sync.spec.js +2 -1
  137. data/spec/client/models/system-setting.spec.js +0 -12
  138. data/spec/client/screens/user-management.spec.jsx +1 -2
  139. data/spec/client/test-models.js +10 -0
  140. data/spec/server/api/tenant_change_spec.rb +1 -2
  141. data/spec/server/asset_spec.rb +2 -2
  142. data/templates/js/config-data.js +1 -1
  143. data/templates/spec/factories/model.rb +1 -1
  144. data/views/hippo_root_view.erb +1 -3
  145. metadata +17 -6
  146. data/client/hippo/components/text-editor/display-modes/SaveState.jsx +0 -17
@@ -45,7 +45,6 @@ module Hippo::API::Handlers
45
45
  end
46
46
 
47
47
  def self.asset_getter
48
- root = Hippo::Extensions.controlling.root_path.join('public', 'assets')
49
48
  webpack = Hippo::API::Root.webpack
50
49
  if Hippo.env.production?
51
50
  lambda do
@@ -61,7 +60,9 @@ module Hippo::API::Handlers
61
60
  webpack.wait_until_available
62
61
  file = webpack.file(params['asset'].to_sym, raise_on_not_found: false)
63
62
  if file
64
- redirect "http://#{env['SERVER_NAME']}:#{webpack.process.port}/assets/#{file}"
63
+ protocol = 'http'
64
+ protocol += 's' if Hippo::Webpack.using_ssl?
65
+ redirect "#{protocol}://#{env['SERVER_NAME']}:#{webpack.process.port}/assets/#{file}"
65
66
  else
66
67
  halt 404
67
68
  end
@@ -1,16 +1,14 @@
1
1
  module Hippo::API::Handlers
2
2
 
3
3
  class Tenant < Hippo::API::ControllerBase
4
- PUBLIC_ATTRS = %w{slug name}
5
4
 
6
5
  def show
7
- std_api_reply(:retrieve, Hippo::Tenant.current, only: PUBLIC_ATTRS)
6
+ std_api_reply(:retrieve, Hippo::Tenant.current.bootstrap_data, success: true)
8
7
  end
9
8
 
10
- # isn't really a create, but FE will think it's creating because we don't expose the id
11
- def create
9
+ def update
12
10
  tenant = Hippo::Tenant.current
13
- tenant.assign_attributes(data.slice(*PUBLIC_ATTRS))
11
+ tenant.assign_attributes(data.slice(*Hippo::Tenant::PUBLIC_ATTRS))
14
12
  success = tenant.save
15
13
  if success && tenant.slug_previously_changed?
16
14
  Hippo::Tenant.system.perform do
@@ -18,7 +16,7 @@ module Hippo::API::Handlers
18
16
  end
19
17
  end
20
18
  std_api_reply(:update, tenant,
21
- only: PUBLIC_ATTRS,
19
+ only: Hippo::Tenant::PUBLIC_ATTRS,
22
20
  success: success)
23
21
  end
24
22
  end
@@ -12,10 +12,6 @@ module Hippo
12
12
  }.join("\n")
13
13
  end
14
14
 
15
- def client_bootstrap_data(mergedWith: {})
16
- API.to_json(Extensions.client_bootstrap_data.merge(mergedWith))
17
- end
18
-
19
15
  def csrf_token
20
16
  Rack::Csrf.csrf_token(env)
21
17
  end
@@ -25,11 +21,13 @@ module Hippo
25
21
  end
26
22
 
27
23
  def error_as_json
28
- Hippo.logger.warn request.env['sinatra.error']
24
+ error = request.env['sinatra.error']
25
+ Hippo.logger.warn error.message
26
+ Hippo.logger.warn error.backtrace.join("\n ")
29
27
  API.to_json(
30
28
  success: false,
31
- errors: { exception: request.env['sinatra.error'].message },
32
- message: request.env['sinatra.error'].message
29
+ errors: { exception: error.message },
30
+ message: error.message
33
31
  )
34
32
  end
35
33
 
@@ -63,8 +63,9 @@ module Hippo
63
63
 
64
64
  if options[:cors] && valid_methods.any?
65
65
  cors = options[:cors].is_a?(Hash) ? otions[:cors] : {origins: options[:cors]}
66
- enable_cors "#{prefix}#{path}/?:id?#{format}",
67
- cors.merge(methods: valid_methods)
66
+ cors_path = "#{prefix}#{path}/?:id?#{format}"
67
+ Hippo.logger.debug("CORS: #{cors_path} #{valid_methods}")
68
+ enable_cors cors_path, cors.merge(methods: valid_methods)
68
69
  end
69
70
 
70
71
  end
@@ -14,6 +14,10 @@ module Hippo
14
14
  def path(size)
15
15
  Hippo.config.api_path + Hippo.config.assets_path_prefix + '/' + file_data[size]['id']
16
16
  end
17
+
18
+ def url(size = 'original')
19
+ "https://#{Hippo::Tenant.current.slug}.#{Hippo.config.website_domain}#{path(size)}"
20
+ end
17
21
  end
18
22
 
19
23
  end
@@ -23,7 +23,7 @@ module Hippo
23
23
  FactoryGirl.find_definitions
24
24
  Hippo::API::Cable.configure
25
25
  MultiTenant.current_tenant = Hippo::Tenant.find_by_slug(
26
- Hippo.env.development? ? 'test' : 'system'
26
+ Hippo.env.development? ? 'dev' : 'system'
27
27
  )
28
28
  ext.on_dev_console
29
29
  Pry::Commands.block_command "tenant", "set current tenant to <slug>" do |slug|
@@ -26,11 +26,16 @@ module Hippo::Concerns
26
26
  plugin :versions
27
27
  plugin :location_hash
28
28
 
29
+
29
30
  process(:store) do |io, context|
30
- size_800 = resize_to_limit(io.download, 800, 800)
31
- size_500 = resize_to_limit(size_800, 500, 500)
32
- size_300 = resize_to_limit(size_500, 300, 300)
33
- {original: size_800, medium: size_500, thumbnail: size_300}
31
+ if io.metadata['mime_type'] && io.metadata['mime_type'].starts_with?('image')
32
+ size_1000 = resize_to_limit(io.download, 1000, 1000)
33
+ size_600 = resize_to_limit(size_1000, 600, 600)
34
+ size_300 = resize_to_limit(size_600, 300, 300)
35
+ {original: io, large: size_1000, medium: size_600, thumbnail: size_300}
36
+ else
37
+ {original: io}
38
+ end
34
39
  end
35
40
 
36
41
  end
@@ -8,10 +8,10 @@ module Hippo
8
8
 
9
9
  module ClassMethods
10
10
 
11
- def compose_query_using_detail_view( view: nil, join_to: nil )
11
+ def compose_query_using_detail_view( view: nil, join_to: nil, join_name: 'details' )
12
12
  join_to ||= self.name.demodulize.tableize.singularize + '_' + primary_key
13
- q = joins("join #{view} as details on details.#{join_to} = #{table_name}.#{primary_key}")
14
- .select("details.*")
13
+ q = joins("join #{view} as #{join_name} on #{join_name}.#{join_to} = #{table_name}.#{primary_key}")
14
+ .select("#{join_name}.*")
15
15
  if current_scope.nil? || current_scope.select_values.exclude?("#{table_name}.*")
16
16
  q = q.select("#{table_name}.*")
17
17
  end
@@ -94,8 +94,9 @@ module Hippo
94
94
  return nil
95
95
  end
96
96
 
97
-
98
- def client_bootstrap_data
97
+ ## Data returned will be included in the JS build;
98
+ ## it should not be Tenant specific
99
+ def static_bootstrap_data
99
100
  data = {}
100
101
  %w{
101
102
  api_path environment website_domain product_name assets_path_prefix
@@ -106,12 +107,22 @@ module Hippo
106
107
  controlling_extension: controlling.identifier,
107
108
  )
108
109
  each do | ext |
109
- ext_data = ext.client_bootstrap_data
110
+ ext_data = ext.static_bootstrap_data
110
111
  data[ext.identifier] = ext_data unless ext_data.nil?
111
112
  end
113
+ data[:screen_ids] = Hippo::Screen.active_ids
112
114
  return data
113
115
  end
114
116
 
117
+ def tenant_bootstrap_data(tenant)
118
+ data = {}
119
+ each do | ext |
120
+ tenant_data = ext.tenant_bootstrap_data(tenant)
121
+ data[ext.identifier] = tenant_data unless tenant_data.nil?
122
+ end
123
+ data
124
+ end
125
+
115
126
  def load_controlling_config
116
127
  config_file = self.controlling.root_path.join('config','initialize.rb')
117
128
  if config_file.exist?
@@ -129,7 +140,6 @@ module Hippo
129
140
 
130
141
  end
131
142
 
132
-
133
143
  end
134
144
 
135
145
  require_relative 'extension/definition'
@@ -39,7 +39,11 @@ module Hippo
39
39
  self.before = extension
40
40
  end
41
41
 
42
- def client_bootstrap_data
42
+ def static_bootstrap_data
43
+ {}
44
+ end
45
+
46
+ def tenant_bootstrap_data(tenant)
43
47
  {}
44
48
  end
45
49
 
@@ -3,27 +3,40 @@ require 'logger'
3
3
 
4
4
  module Hippo
5
5
 
6
- class MultiDestinationLogger
7
- def initialize
8
- @targets = [STDOUT]
9
- @targets.push(
10
- File.open("log/#{Hippo.config.environment}.log", "a")
11
- ) if File.writable?("log")
12
- end
6
+ class MultiDestinationLogger < ::Logger
7
+ class Output
8
+ def initialize
9
+ @targets = [STDOUT]
10
+ @targets.push(
11
+ File.open("log/#{Hippo.config.environment}.log", "a")
12
+ ) if File.writable?("log")
13
+ end
13
14
 
14
- def write(*args)
15
- @targets.each {|t| t.write(*args)}
16
- end
15
+ def write(*args)
16
+ @targets.each {|t| t.write(*args)}
17
+ end
17
18
 
18
- def close
19
- @targets.each(&:close)
19
+ def close
20
+ @targets.each(&:close)
21
+ end
20
22
  end
21
23
 
24
+ def initialize
25
+ super Output.new
26
+ self.formatter = proc do |severity, datetime, progname, msg|
27
+ sprintf "%5.5s %s\n", severity, msg
28
+ end
29
+ if ENV['LOG']
30
+ self.level = ::Logger.const_get(ENV['LOG'].upcase)
31
+ else
32
+ self.level = ::Logger::INFO
33
+ end
34
+ end
22
35
  end
23
36
 
24
37
  class << self
25
38
  def logger
26
- @logger ||= _create_logger
39
+ @logger ||= MultiDestinationLogger.new
27
40
  end
28
41
 
29
42
  def logger=( logger )
@@ -46,19 +59,5 @@ module Hippo
46
59
  logger.debug '⚡ '*40
47
60
  end
48
61
 
49
- private
50
-
51
- def _create_logger
52
- logger = ::Logger.new MultiDestinationLogger.new
53
- logger.formatter = proc do |severity, datetime, progname, msg|
54
- sprintf "%5.5s %s\n", severity, msg
55
- end
56
- if ENV['LOG']
57
- logger.level = ::Logger.const_get(ENV['LOG'].upcase)
58
- else
59
- logger.level = ::Logger::INFO
60
- end
61
- logger
62
- end
63
62
  end
64
63
  end
@@ -3,29 +3,41 @@ require 'mail'
3
3
  module Hippo
4
4
 
5
5
  module Mailer
6
+
7
+ class TestMailer < Mail::TestMailer
8
+ def deliver!(mail)
9
+ retval = super
10
+ Hippo.logger.info { mail.encoded }
11
+ retval
12
+ end
13
+ end
14
+
6
15
  class << self
7
16
 
8
17
  def create
9
18
  config = SystemSettings.for_ext(:smtp)
10
- delivery = delivery_method_config(config)
19
+ delivery_config = delivery_method_config(config)
11
20
  Mail::Message.new do
12
21
  from "\"#{config['from_name']}\" <#{config['from_email']}>"
13
- delivery_method delivery[:via], delivery[:config]
22
+ if Hippo.env.production?
23
+ delivery_method :smtp, delivery_config
24
+ else
25
+ delivery_method TestMailer, delivery_config
26
+ end
14
27
  end
15
28
  end
16
29
 
17
30
  def delivery_method_config(config)
18
- config = Hippo.config.secrets.smtp || {}
19
- {
20
- via: Hippo.env.production? ? :smtp : :test,
21
- config: {
31
+ Hippo::Tenant.system.perform do
32
+ config = Hippo.config.secrets.smtp || {}
33
+ {
22
34
  address: config['address'],
23
35
  user_name: config['user_name'],
24
36
  password: config['password'],
25
37
  enable_starttls_auto: true,
26
38
  port: 587
27
39
  }
28
- }
40
+ end
29
41
  end
30
42
 
31
43
  def from_template(template)
@@ -30,15 +30,21 @@ module Hippo
30
30
  ExtensionSettings.new(extension_id, settings[extension_id.to_s])
31
31
  end
32
32
 
33
+ def public_json
34
+ {
35
+ 'logo' => Hippo::SystemSettings.config
36
+ .as_json(include: ['logo'])
37
+ .dig('logo', 'file_data')
38
+ }
39
+ end
40
+
33
41
  class << self
34
42
  def config
35
- SystemSettings.first_or_create
43
+ Tenant.current.system_settings || Tenant.current.create_system_settings
36
44
  end
37
45
 
38
46
  def public_json
39
- {
40
- 'logo' => Hippo::SystemSettings.config.as_json(include: ['logo']).dig('logo', 'file_data')
41
- }
47
+ config.public_json
42
48
  end
43
49
 
44
50
  def for_ext(extension_id)
@@ -1,4 +1,5 @@
1
1
  require 'liquid'
2
+ require_rel 'liquid/*.rb'
2
3
 
3
4
  module Hippo
4
5
 
@@ -0,0 +1,16 @@
1
+ module Pluralize
2
+
3
+ def pluralize(number, singular, plural = nil)
4
+ number = number.to_i
5
+ if number == 1
6
+ "#{number} #{singular}"
7
+ elsif plural.nil?
8
+ "#{number} #{singular}s"
9
+ else
10
+ "#{number} #{plural}"
11
+ end
12
+ end
13
+
14
+ end
15
+
16
+ Liquid::Template.register_filter(Pluralize)
@@ -3,6 +3,9 @@ require 'activerecord-multi-tenant'
3
3
  module Hippo
4
4
  # Tenant
5
5
  class Tenant < Hippo::Model
6
+
7
+ PUBLIC_ATTRS = %w{slug name identifier}
8
+
6
9
  validates :slug, uniqueness: true
7
10
  validates :name, :presence => { message: 'for company' }
8
11
  validates :email, :presence => true
@@ -10,6 +13,9 @@ module Hippo
10
13
  has_random_identifier
11
14
  has_many :users, class_name: 'Hippo::User', autosave: true
12
15
 
16
+ belongs_to :system_settings, class_name: 'Hippo::SystemSettings',
17
+ foreign_key: :id, primary_key: :tenant_id
18
+
13
19
  before_validation :auto_assign_slug, on: :create
14
20
 
15
21
  before_save :downcase_slug
@@ -24,8 +30,18 @@ module Hippo
24
30
  end
25
31
  end
26
32
 
33
+ def bootstrap_data
34
+ as_json(
35
+ only: PUBLIC_ATTRS,
36
+ ).merge(
37
+ bootstrap: system_settings.public_json.merge(
38
+ Hippo::Extensions.tenant_bootstrap_data(self)
39
+ )
40
+ )
41
+ end
42
+
27
43
  def self.current
28
- MultiTenant.current_tenant
44
+ MultiTenant.current_tenant || system
29
45
  end
30
46
 
31
47
  def self.system
@@ -23,15 +23,16 @@ module Hippo
23
23
  end
24
24
 
25
25
  def workspace_data
26
- my_data = attributes.slice('id','login','name','email','created_at',
27
- 'created_by','updated_at','updated_by','role_names', 'options')
28
-
29
- Hippo::SystemSettings
30
- .public_json
31
- .merge(
32
- user: my_data, access: Access.for_user(self), access_token: jwt_token,
33
- screen_ids: Hippo::Screen.active_ids,
34
- )
26
+ user_data = attributes.slice(
27
+ 'id','login','name','email', 'role_names', 'options',
28
+ 'created_at','created_by','updated_at', 'updated_by'
29
+ )
30
+ {
31
+ user: user_data,
32
+ access: Access.for_user(self),
33
+ access_token: jwt_token,
34
+ screen_ids: Hippo::Screen.active_ids,
35
+ }
35
36
  end
36
37
 
37
38
  # @param model [Hippo::Model]
@@ -1,5 +1,5 @@
1
1
  module Hippo
2
2
 
3
- VERSION = "0.9.7"
3
+ VERSION = "0.9.8"
4
4
 
5
5
  end