lato 0.1.31 → 0.1.32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -3
- data/app/controllers/lato/authentication_controller.rb +1 -1
- data/app/controllers/lato/operations_controller.rb +6 -0
- data/app/models/lato/invitation.rb +1 -0
- data/app/models/lato/user.rb +2 -1
- data/app/views/lato/components/_operation.html.erb +1 -1
- data/config/routes.rb +10 -3
- data/db/migrate/20230212211748_add_inviter_lato_user_id_to_invitations.rb +5 -0
- data/lib/lato/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: faf414da4198b779d11712f44baba294d97c38a31a9040599b30e535d0fea6a7
|
4
|
+
data.tar.gz: '0236985df9e2cd66f6a9051b1ab5fdd87f5bc7ecee8fae6075ee019e9017a899'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 448aa836e157e84b477102ed20e9589ceeef4c7132ead7326390886976146ddfc210e7cefa817ee0dc0c3c1d2f331c49248832fcf21f6b8710eb7ea3bff4af07
|
7
|
+
data.tar.gz: c7abaf771d02c2dc3d5be980f79f026306c3c154834ac752bf6d9a22aabfec3e0139c84ecbcdd767cc47dec2452c51ba91eed1fc3548a4cc134205104c2ca982
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@ module Lato
|
|
2
2
|
class AuthenticationController < ApplicationController
|
3
3
|
before_action :not_authenticate_session, only: %i[signin signin_action signup signup_action accept_invitation accept_invitation_action]
|
4
4
|
before_action :authenticate_session, only: %i[signout signout_action]
|
5
|
-
|
5
|
+
|
6
6
|
before_action :find_user, only: %i[verify_email verify_email_action update_password update_password_action]
|
7
7
|
before_action :find_invitation, only: %i[accept_invitation accept_invitation_action]
|
8
8
|
|
@@ -7,6 +7,12 @@ module Lato
|
|
7
7
|
return unless validate_user_access_to_operation
|
8
8
|
end
|
9
9
|
|
10
|
+
def show_legacy
|
11
|
+
Rails.logger.warn('🚨 Legacy route used: operations/show/:id. Please replace operation_show_path with operation_path.')
|
12
|
+
|
13
|
+
redirect_to lato.operation_path(params[:id])
|
14
|
+
end
|
15
|
+
|
10
16
|
private
|
11
17
|
|
12
18
|
def validate_user_access_to_operation
|
data/app/models/lato/user.rb
CHANGED
@@ -25,6 +25,7 @@ module Lato
|
|
25
25
|
|
26
26
|
has_many :lato_operations, class_name: 'Lato::Operation', foreign_key: :lato_user_id, dependent: :nullify
|
27
27
|
has_many :lato_invitations, class_name: 'Lato::Invitation', foreign_key: :lato_user_id, dependent: :nullify
|
28
|
+
has_many :lato_invitations_as_inviter, class_name: 'Lato::Invitation', foreign_key: :inviter_lato_user_id, dependent: :nullify
|
28
29
|
|
29
30
|
has_many :lato_log_user_signins, class_name: 'Lato::Log::UserSignin', foreign_key: :lato_user_id, dependent: :nullify
|
30
31
|
|
@@ -208,7 +209,7 @@ module Lato
|
|
208
209
|
raise ActiveRecord::Rollback unless save && invitation.update(
|
209
210
|
accepted_at: Time.now,
|
210
211
|
lato_user_id: id
|
211
|
-
)
|
212
|
+
)
|
212
213
|
|
213
214
|
true
|
214
215
|
end
|
@@ -62,7 +62,7 @@
|
|
62
62
|
<% end %>
|
63
63
|
|
64
64
|
<% unless operation.finished? %>
|
65
|
-
<%= link_to '', lato.
|
65
|
+
<%= link_to '', lato.operation_path(operation), class: 'd-none', data: { lato_operation_target: 'update', turbo_frame: '_self' } %>
|
66
66
|
<% end %>
|
67
67
|
</div>
|
68
68
|
<% end %>
|
data/config/routes.rb
CHANGED
@@ -23,6 +23,9 @@ Lato::Engine.routes.draw do
|
|
23
23
|
post 'accept_invitation_action', to: 'authentication#accept_invitation_action', as: :authentication_accept_invitation_action
|
24
24
|
end
|
25
25
|
|
26
|
+
# Account
|
27
|
+
##
|
28
|
+
|
26
29
|
scope :account do
|
27
30
|
get '', to: 'account#index', as: :account
|
28
31
|
patch 'update_user_action', to: 'account#update_user_action', as: :account_update_user_action
|
@@ -33,7 +36,11 @@ Lato::Engine.routes.draw do
|
|
33
36
|
patch 'update_accepted_terms_and_conditions_version_action', to: 'account#update_accepted_terms_and_conditions_version_action', as: :account_update_accepted_terms_and_conditions_version_action
|
34
37
|
end
|
35
38
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
+
# Operations
|
40
|
+
##
|
41
|
+
|
42
|
+
get 'operation/:id', to: 'operations#show', as: :operation
|
43
|
+
|
44
|
+
# NOTE: Legacy route
|
45
|
+
get 'operations/show/:id', to: 'operations#show_legacy', as: :operations_show
|
39
46
|
end
|
data/lib/lato/version.rb
CHANGED
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: 0.1.
|
4
|
+
version: 0.1.32
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregorio Galante
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- db/migrate/20221229233844_add_locale_to_lato_user.rb
|
194
194
|
- db/migrate/20230109054412_create_lato_log_user_signins.rb
|
195
195
|
- db/migrate/20230109061533_create_lato_invitations.rb
|
196
|
+
- db/migrate/20230212211748_add_inviter_lato_user_id_to_invitations.rb
|
196
197
|
- lib/lato.rb
|
197
198
|
- lib/lato/btstrap.rb
|
198
199
|
- lib/lato/config.rb
|