lato 3.13.2 → 3.13.4

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
  SHA256:
3
- metadata.gz: bc8aaad0344f244ad56c9b5e5c71f5826538506a54661aca7ab6c6e6642a4b97
4
- data.tar.gz: d834736ff93566c6026955e539bd9df0f7fa48919a568e170ec089774f06e87f
3
+ metadata.gz: 53eff868aa3041025a81fd23b1e874a993a7057fbcaa0300c1028e91e24eba74
4
+ data.tar.gz: 967c80e88408aad0dc0bec51f5035fa438ed7cab886eb9559ca5775fe651b354
5
5
  SHA512:
6
- metadata.gz: f7de79c410dab2bc114f2a42c57f68ba5d704a008c79e49584429c5beca4f805d38f19b209c04d0e2d85d4b0d632d4484af0f4bf98a80715cae0530ce307b287
7
- data.tar.gz: 3197c44ce5f830011c37911464e9603b1f4d213020d8b0dda20c73e5f19e405c1a99643e7fc3b4590397ad7a49cf23449f5ad584acbe63b48db4f0881ef0de7a
6
+ metadata.gz: d531081996ed2132bfa97bd3f9291c320fb8663e019fe6729c8a416dc18b1004e664bd88401f8788930c2b97a544a4f226725607f6a3fca535bf7015f63338f3
7
+ data.tar.gz: 40f9d0c5573cf96667841fae74becc774af7e20a3b955936064eea6778017fab28e8dcb7bd9bdc77a9a6ff30a828cea70acf20a88a546be884e309cfeb55ec0f
data/README.md CHANGED
@@ -26,8 +26,9 @@ You can also use the [Lato AI Agent](http://lato.gregoriogalante.com/AI.html) di
26
26
  ## Eco-system
27
27
  The idea behind Lato is to create an eco-system of engines that can improve the functionalities of the panel. The following engines are already available:
28
28
 
29
- - [LatoSpaces](https://github.com/Lato-org/lato_spaces): A simple engine to manage multiple workspaces in the panel with user invitation and workspace roles;
30
- - [LatoSettings](https://github.com/Lato-org/lato_settings): A simple engine to manage application settings from the UI panel;
29
+ - [Lato Spaces](https://github.com/Lato-org/lato_spaces): manage multiple workspaces in the panel with user invitation and workspace roles;
30
+ - [Lato Settings](https://github.com/Lato-org/lato_settings): manage application settings from the UI panel;
31
+ - [Lato Storage](https://github.com/Lato-org/lato_storage): manage storage (Active Storage data) from the UI panel;
31
32
 
32
33
  ## Installation
33
34
  Add required dependencies to your application's Gemfile:
@@ -38,7 +38,7 @@ module Lato
38
38
  collection = collection.lato_index_search(search)
39
39
  else
40
40
  query = @_lato_index[key][:searchable_columns].map do |key|
41
- if collection.column_for_attribute(key).type == :string
41
+ if collection.column_for_attribute(key).type == :string || collection.column_for_attribute(key).type == :text || collection.column_for_attribute(key).type == :integer
42
42
  "LOWER(#{key}) LIKE :search"
43
43
  else
44
44
  "CAST(#{key} AS TEXT) LIKE :search"
@@ -8,7 +8,8 @@ module Lato
8
8
  ##
9
9
 
10
10
  def valid?
11
- !@session.blank?
11
+ # !@session.blank?
12
+ really_valid?
12
13
  end
13
14
 
14
15
  def really_valid?
@@ -65,6 +65,22 @@ module Lato
65
65
  "#{last_name} #{first_name}"
66
66
  end
67
67
 
68
+ def email_protected
69
+ return email unless email.include?('@')
70
+
71
+ local_part, domain = email.split('@', 2)
72
+
73
+ # Keep first 2 characters of local part
74
+ chars_to_keep = [local_part.length, 2].min
75
+ protected_local = local_part[0, chars_to_keep] + '*' * [local_part.length - chars_to_keep, 0].max
76
+
77
+ # Keep domain as is or partially protect it
78
+ chars_to_keep = [domain.length, 2].min
79
+ protected_domain = domain[0, chars_to_keep] + '*' * [domain.length - chars_to_keep, 0].max
80
+
81
+ "#{protected_local}@#{protected_domain}"
82
+ end
83
+
68
84
  def gravatar_image_url(size = 200)
69
85
  @gravatar_image_url ||= "https://www.gravatar.com/avatar/#{Digest::MD5.hexdigest(email)}?s=#{size}"
70
86
  end
@@ -10,7 +10,7 @@ user ||= Lato::User.new
10
10
  <%= lato_form_errors user, class: %w[mb-3] %>
11
11
 
12
12
  <div class="mb-3 text-center">
13
- <p><%= raw I18n.t('lato.authenticator_code_help', email: user.email) %></p>
13
+ <p><%= raw I18n.t('lato.authenticator_code_help', email: user.email_protected) %></p>
14
14
  </div>
15
15
 
16
16
  <div class="mb-3">
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.13.2"
2
+ VERSION = "3.13.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.13.2
4
+ version: 3.13.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-18 00:00:00.000000000 Z
11
+ date: 2025-05-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails