rodauth 2.24.0 → 2.25.0
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 +4 -4
- data/CHANGELOG +4 -0
- data/doc/guides/paths.rdoc +12 -0
- data/doc/release_notes/2.25.0.txt +8 -0
- data/lib/rodauth/features/base.rb +4 -1
- data/lib/rodauth/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 934d5c19d29c583ebc73a057ba96a1c321741a64c965b22f4a243a42f56eab81
|
4
|
+
data.tar.gz: 6398ec3d3bc1ee36a2195909b545ba5df9f0282c5a5b9136babb3538f21cb98e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32bae60cf66d97326397f3429d74ac2e7093afae74c59191bba5013ad6c7ec46782ddfa54c0a28b9a68c38cbf52b7e5071cd9d4eb7e434e5632c70842658120c
|
7
|
+
data.tar.gz: b157ffa28b3f539c7618d747ab8cee321de6fbfdac11c603176b325ce54d10294a9b8860715a27c08e7d6128928e78d51e8f776b0201fcadec99075354c32f51
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
=== 2.25.0 (2022-06-22)
|
2
|
+
|
3
|
+
* Support disabling routes by passing nil/false to *_route methods (janko) (#245)
|
4
|
+
|
1
5
|
=== 2.24.0 (2022-05-24)
|
2
6
|
|
3
7
|
* Work around implicit null byte check added in bcrypt 3.1.18 by checking password requirements before other password checks (jeremyevans)
|
data/doc/guides/paths.rdoc
CHANGED
@@ -37,3 +37,15 @@ setting:
|
|
37
37
|
|
38
38
|
# ...
|
39
39
|
end
|
40
|
+
|
41
|
+
There are cases where you may want to disable certain routes. For example, you
|
42
|
+
may want to enable the create_account feature to allow creating admins, but
|
43
|
+
only make it possible programmatically via internal requests. In this case,
|
44
|
+
you should set the corresponding <tt>*_route</tt> method to +nil+:
|
45
|
+
|
46
|
+
plugin :rodauth, name: :admin do
|
47
|
+
enable :create_account
|
48
|
+
|
49
|
+
# disable the /create-account route
|
50
|
+
create_account_route nil
|
51
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
= New Features
|
2
|
+
|
3
|
+
* You can now disable routing to specific routes by calling the
|
4
|
+
related *_route configuration method with nil or false. The main
|
5
|
+
reason you would want to do this is if you want to load a feature,
|
6
|
+
but only want to use it for internal requests (using the
|
7
|
+
internal_request feature), and not have the feature's routes exposed
|
8
|
+
to users.
|
@@ -402,7 +402,10 @@ module Rodauth
|
|
402
402
|
db.extension :date_arithmetic if use_date_arithmetic?
|
403
403
|
route_hash= {}
|
404
404
|
self.class.routes.each do |meth|
|
405
|
-
|
405
|
+
route_meth = "#{meth.to_s.sub(/\Ahandle_/, '')}_route"
|
406
|
+
if route = send(route_meth)
|
407
|
+
route_hash["/#{route}"] = meth
|
408
|
+
end
|
406
409
|
end
|
407
410
|
self.class.route_hash = route_hash.freeze
|
408
411
|
end
|
data/lib/rodauth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rodauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.25.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Evans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|
@@ -340,6 +340,7 @@ extra_rdoc_files:
|
|
340
340
|
- doc/release_notes/2.22.0.txt
|
341
341
|
- doc/release_notes/2.23.0.txt
|
342
342
|
- doc/release_notes/2.24.0.txt
|
343
|
+
- doc/release_notes/2.25.0.txt
|
343
344
|
- doc/release_notes/2.3.0.txt
|
344
345
|
- doc/release_notes/2.4.0.txt
|
345
346
|
- doc/release_notes/2.5.0.txt
|
@@ -451,6 +452,7 @@ files:
|
|
451
452
|
- doc/release_notes/2.22.0.txt
|
452
453
|
- doc/release_notes/2.23.0.txt
|
453
454
|
- doc/release_notes/2.24.0.txt
|
455
|
+
- doc/release_notes/2.25.0.txt
|
454
456
|
- doc/release_notes/2.3.0.txt
|
455
457
|
- doc/release_notes/2.4.0.txt
|
456
458
|
- doc/release_notes/2.5.0.txt
|