Skip to content

Commit a2d8b85

Browse files
authored
Merge from docusealco/wip
2 parents 7ce6c29 + 4d68783 commit a2d8b85

90 files changed

Lines changed: 1237 additions & 605 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Gemfile.lock

Lines changed: 79 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
action_text-trix (2.1.18)
4+
action_text-trix (2.1.19)
55
railties
6-
actioncable (8.1.3)
7-
actionpack (= 8.1.3)
8-
activesupport (= 8.1.3)
6+
actioncable (8.1.3.1)
7+
actionpack (= 8.1.3.1)
8+
activesupport (= 8.1.3.1)
99
nio4r (~> 2.0)
1010
websocket-driver (>= 0.6.1)
1111
zeitwerk (~> 2.6)
12-
actionmailbox (8.1.3)
13-
actionpack (= 8.1.3)
14-
activejob (= 8.1.3)
15-
activerecord (= 8.1.3)
16-
activestorage (= 8.1.3)
17-
activesupport (= 8.1.3)
12+
actionmailbox (8.1.3.1)
13+
actionpack (= 8.1.3.1)
14+
activejob (= 8.1.3.1)
15+
activerecord (= 8.1.3.1)
16+
activestorage (= 8.1.3.1)
17+
activesupport (= 8.1.3.1)
1818
mail (>= 2.8.0)
19-
actionmailer (8.1.3)
20-
actionpack (= 8.1.3)
21-
actionview (= 8.1.3)
22-
activejob (= 8.1.3)
23-
activesupport (= 8.1.3)
19+
actionmailer (8.1.3.1)
20+
actionpack (= 8.1.3.1)
21+
actionview (= 8.1.3.1)
22+
activejob (= 8.1.3.1)
23+
activesupport (= 8.1.3.1)
2424
mail (>= 2.8.0)
2525
rails-dom-testing (~> 2.2)
26-
actionpack (8.1.3)
27-
actionview (= 8.1.3)
28-
activesupport (= 8.1.3)
26+
actionpack (8.1.3.1)
27+
actionview (= 8.1.3.1)
28+
activesupport (= 8.1.3.1)
2929
nokogiri (>= 1.8.5)
3030
rack (>= 2.2.4)
3131
rack-session (>= 1.0.1)
3232
rack-test (>= 0.6.3)
3333
rails-dom-testing (~> 2.2)
3434
rails-html-sanitizer (~> 1.6)
3535
useragent (~> 0.16)
36-
actiontext (8.1.3)
36+
actiontext (8.1.3.1)
3737
action_text-trix (~> 2.1.15)
38-
actionpack (= 8.1.3)
39-
activerecord (= 8.1.3)
40-
activestorage (= 8.1.3)
41-
activesupport (= 8.1.3)
38+
actionpack (= 8.1.3.1)
39+
activerecord (= 8.1.3.1)
40+
activestorage (= 8.1.3.1)
41+
activesupport (= 8.1.3.1)
4242
globalid (>= 0.6.0)
4343
nokogiri (>= 1.8.5)
44-
actionview (8.1.3)
45-
activesupport (= 8.1.3)
44+
actionview (8.1.3.1)
45+
activesupport (= 8.1.3.1)
4646
builder (~> 3.1)
4747
erubi (~> 1.11)
4848
rails-dom-testing (~> 2.2)
4949
rails-html-sanitizer (~> 1.6)
50-
activejob (8.1.3)
51-
activesupport (= 8.1.3)
50+
activejob (8.1.3.1)
51+
activesupport (= 8.1.3.1)
5252
globalid (>= 0.3.6)
53-
activemodel (8.1.3)
54-
activesupport (= 8.1.3)
55-
activerecord (8.1.3)
56-
activemodel (= 8.1.3)
57-
activesupport (= 8.1.3)
53+
activemodel (8.1.3.1)
54+
activesupport (= 8.1.3.1)
55+
activerecord (8.1.3.1)
56+
activemodel (= 8.1.3.1)
57+
activesupport (= 8.1.3.1)
5858
timeout (>= 0.4.0)
59-
activestorage (8.1.3)
60-
actionpack (= 8.1.3)
61-
activejob (= 8.1.3)
62-
activerecord (= 8.1.3)
63-
activesupport (= 8.1.3)
59+
activestorage (8.1.3.1)
60+
actionpack (= 8.1.3.1)
61+
activejob (= 8.1.3.1)
62+
activerecord (= 8.1.3.1)
63+
activesupport (= 8.1.3.1)
6464
marcel (~> 1.0)
65-
activesupport (8.1.3)
65+
activesupport (8.1.3.1)
6666
base64
6767
bigdecimal
6868
concurrent-ruby (~> 1.0, >= 1.3.1)
@@ -144,7 +144,7 @@ GEM
144144
cldr-plurals-runtime-rb (1.1.0)
145145
cmdparse (3.0.7)
146146
coderay (1.1.3)
147-
concurrent-ruby (1.3.7)
147+
concurrent-ruby (1.3.8)
148148
connection_pool (3.0.2)
149149
crack (1.0.1)
150150
bigdecimal
@@ -179,7 +179,7 @@ GEM
179179
dotenv (3.2.0)
180180
drb (2.2.3)
181181
email_typo (0.2.3)
182-
erb (6.0.4)
182+
erb (6.0.6)
183183
erb_lint (0.9.0)
184184
activesupport
185185
better_html (>= 2.0.1)
@@ -217,7 +217,7 @@ GEM
217217
foreman (0.90.0)
218218
thor (~> 1.4)
219219
geom2d (0.4.1)
220-
globalid (1.3.0)
220+
globalid (1.4.0)
221221
activesupport (>= 6.1)
222222
google-apis-core (1.0.2)
223223
addressable (~> 2.8, >= 2.8.7)
@@ -262,7 +262,7 @@ GEM
262262
geom2d (~> 0.4, >= 0.4.1)
263263
openssl (>= 2.2.1)
264264
strscan (>= 3.1.2)
265-
i18n (1.14.8)
265+
i18n (1.15.2)
266266
concurrent-ruby (~> 1.0)
267267
io-console (0.8.2)
268268
irb (1.18.0)
@@ -271,7 +271,7 @@ GEM
271271
rdoc (>= 4.0.0)
272272
reline (>= 0.4.2)
273273
jmespath (1.6.2)
274-
json (2.19.9)
274+
json (2.21.1)
275275
jwt (3.2.0)
276276
base64
277277
language_server-protocol (3.17.0.5)
@@ -296,24 +296,24 @@ GEM
296296
loofah (2.25.2)
297297
crass (~> 1.0.2)
298298
nokogiri (>= 1.12.0)
299-
mail (2.9.0)
299+
mail (2.9.1)
300300
logger
301301
mini_mime (>= 0.1.1)
302302
net-imap
303303
net-pop
304304
net-smtp
305-
marcel (1.1.0)
305+
marcel (1.2.1)
306306
matrix (0.4.3)
307307
method_source (1.1.0)
308308
mini_mime (1.1.5)
309309
minitest (6.0.6)
310310
drb (~> 2.0)
311311
prism (~> 1.5)
312-
msgpack (1.8.0)
312+
msgpack (1.8.4)
313313
multi_json (1.19.1)
314314
net-http (0.9.1)
315315
uri (>= 0.11.1)
316-
net-imap (0.6.4.1)
316+
net-imap (0.6.6)
317317
date
318318
net-protocol
319319
net-pop (0.1.2)
@@ -344,7 +344,7 @@ GEM
344344
orm_adapter (0.5.0)
345345
os (1.1.4)
346346
package_json (0.2.0)
347-
pagy (43.4.4)
347+
pagy (43.6.1)
348348
json
349349
uri
350350
yaml
@@ -357,7 +357,7 @@ GEM
357357
pg (1.6.3-arm64-darwin)
358358
pg (1.6.3-x86_64-linux)
359359
pg (1.6.3-x86_64-linux-musl)
360-
pp (0.6.3)
360+
pp (0.6.4)
361361
prettyprint
362362
pretender (1.0.0)
363363
actionpack (>= 7.2)
@@ -369,9 +369,6 @@ GEM
369369
reline (>= 0.6.0)
370370
pry-rails (0.3.11)
371371
pry (>= 0.13.0)
372-
psych (5.3.1)
373-
date
374-
stringio
375372
public_suffix (7.0.5)
376373
puma (8.0.2)
377374
nio4r (~> 2.0)
@@ -386,20 +383,20 @@ GEM
386383
rack (>= 1.3)
387384
rackup (2.3.1)
388385
rack (>= 3)
389-
rails (8.1.3)
390-
actioncable (= 8.1.3)
391-
actionmailbox (= 8.1.3)
392-
actionmailer (= 8.1.3)
393-
actionpack (= 8.1.3)
394-
actiontext (= 8.1.3)
395-
actionview (= 8.1.3)
396-
activejob (= 8.1.3)
397-
activemodel (= 8.1.3)
398-
activerecord (= 8.1.3)
399-
activestorage (= 8.1.3)
400-
activesupport (= 8.1.3)
386+
rails (8.1.3.1)
387+
actioncable (= 8.1.3.1)
388+
actionmailbox (= 8.1.3.1)
389+
actionmailer (= 8.1.3.1)
390+
actionpack (= 8.1.3.1)
391+
actiontext (= 8.1.3.1)
392+
actionview (= 8.1.3.1)
393+
activejob (= 8.1.3.1)
394+
activemodel (= 8.1.3.1)
395+
activerecord (= 8.1.3.1)
396+
activestorage (= 8.1.3.1)
397+
activesupport (= 8.1.3.1)
401398
bundler (>= 1.15.0)
402-
railties (= 8.1.3)
399+
railties (= 8.1.3.1)
403400
rails-dom-testing (2.3.0)
404401
activesupport (>= 5.0.0)
405402
minitest
@@ -410,9 +407,9 @@ GEM
410407
rails-i18n (8.1.0)
411408
i18n (>= 0.7, < 2)
412409
railties (>= 8.0.0, < 9)
413-
railties (8.1.3)
414-
actionpack (= 8.1.3)
415-
activesupport (= 8.1.3)
410+
railties (8.1.3.1)
411+
actionpack (= 8.1.3.1)
412+
activesupport (= 8.1.3.1)
416413
irb (~> 1.13)
417414
rackup (>= 1.0.0)
418415
rake (>= 12.2)
@@ -421,9 +418,14 @@ GEM
421418
zeitwerk (~> 2.6)
422419
rainbow (3.1.1)
423420
rake (13.4.2)
424-
rdoc (7.2.0)
421+
rbs (4.1.0)
422+
logger
423+
prism (>= 1.6.0)
424+
tsort
425+
rdoc (8.0.0)
425426
erb
426-
psych (>= 4.0.0)
427+
prism (>= 1.6.0)
428+
rbs (>= 4.0.0)
427429
tsort
428430
redis-client (0.29.0)
429431
connection_pool
@@ -525,12 +527,11 @@ GEM
525527
simplecov-html (0.13.2)
526528
simplecov_json_formatter (0.1.4)
527529
smart_properties (1.17.0)
528-
sqlite3 (2.9.2-aarch64-linux-gnu)
529-
sqlite3 (2.9.2-aarch64-linux-musl)
530-
sqlite3 (2.9.2-arm64-darwin)
531-
sqlite3 (2.9.2-x86_64-linux-gnu)
532-
sqlite3 (2.9.2-x86_64-linux-musl)
533-
stringio (3.2.0)
530+
sqlite3 (2.9.5-aarch64-linux-gnu)
531+
sqlite3 (2.9.5-aarch64-linux-musl)
532+
sqlite3 (2.9.5-arm64-darwin)
533+
sqlite3 (2.9.5-x86_64-linux-gnu)
534+
sqlite3 (2.9.5-x86_64-linux-musl)
534535
strip_attributes (2.0.1)
535536
activemodel (>= 3.0, < 9.0)
536537
strscan (3.1.8)
@@ -570,14 +571,14 @@ GEM
570571
crack (>= 0.3.2)
571572
hashdiff (>= 0.4.0, < 2.0.0)
572573
webrick (1.9.2)
573-
websocket-driver (0.8.0)
574+
websocket-driver (0.8.2)
574575
base64
575576
websocket-extensions (>= 0.1.0)
576577
websocket-extensions (0.1.5)
577578
xpath (3.2.0)
578579
nokogiri (~> 1.8)
579580
yaml (0.4.0)
580-
zeitwerk (2.7.5)
581+
zeitwerk (2.8.2)
581582

582583
PLATFORMS
583584
aarch64-linux

app/controllers/account_configs_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def create
3737
end
3838

3939
def destroy
40-
raise InvalidKey unless allowed_keys.include?(@account_config.key)
40+
raise InvalidKey unless allowed_destroy_keys.include?(@account_config.key)
4141

4242
@account_config.destroy!
4343

@@ -50,6 +50,10 @@ def allowed_keys
5050
ALLOWED_KEYS
5151
end
5252

53+
def allowed_destroy_keys
54+
ALLOWED_KEYS
55+
end
56+
5357
def load_account_config
5458
raise InvalidKey unless allowed_keys.include?(account_config_params[:key])
5559

app/controllers/mfa_setup_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def create
2020

2121
redirect_to settings_profile_index_path, notice: I18n.t('2fa_has_been_configured')
2222
else
23+
RateLimit.call("mfa-setup-otp-#{current_user.id}", limit: 5, ttl: 5.minutes, enabled: true)
24+
2325
@provision_url = current_user.otp_provisioning_uri(current_user.email, issuer: Docuseal.product_name)
2426

2527
@error_message = I18n.t('code_is_invalid')
@@ -34,6 +36,8 @@ def destroy
3436

3537
redirect_to settings_profile_index_path, notice: I18n.t('2fa_has_been_removed')
3638
else
39+
RateLimit.call("mfa-setup-otp-#{current_user.id}", limit: 5, ttl: 5.minutes, enabled: true)
40+
3741
@error_message = I18n.t('code_is_invalid')
3842

3943
render turbo_stream: turbo_stream.replace(:modal, template: 'mfa_setup/edit'), status: :unprocessable_content
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class SettingsController < ApplicationController
4+
skip_authorization_check
5+
6+
def index; end
7+
end

app/controllers/submission_events_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@ class SubmissionEventsController < ApplicationController
2424

2525
load_and_authorize_resource :submission
2626

27-
def index; end
27+
def index
28+
render :index, layout: 'plain'
29+
end
2830
end

app/controllers/submissions_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ def show
3333

3434
def new
3535
authorize!(:new, Submission)
36+
37+
render :new, layout: 'plain'
3638
end
3739

3840
def create

app/controllers/submitters_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ def edit
88
if @submitter.preferences['email_message_uuid'].present?
99
@submitter.account.email_messages.find_by(uuid: @submitter.preferences['email_message_uuid'])
1010
end
11+
12+
render :edit, layout: 'plain'
1113
end
1214

1315
def update

app/controllers/templates_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ def show
2525
redirect_to root_path
2626
end
2727

28-
def new; end
28+
def new
29+
render :new, layout: 'plain'
30+
end
2931

3032
def edit
3133
@template_data = Templates.serialize_for_builder(@template)

0 commit comments

Comments
 (0)