Skip to content

Commit dbccb2a

Browse files
committed
### Added
- Official Adobe 2023 Support - Gitflows for testing all engines and all versions of ColdBox - Added `transientCache=false` to auth `User` to avoid any issues when doing security operations - Added population control for auth `User` for extra security ### Fixed - `User` auth was not serializing the `id` of the user in the mementifier config
1 parent 8587a70 commit dbccb2a

File tree

2 files changed

+33
-4
lines changed

2 files changed

+33
-4
lines changed

changelog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
- Official Adobe 2023 Support
1515
- Gitflows for testing all engines and all versions of ColdBox
16+
- Added `transientCache=false` to auth `User` to avoid any issues when doing security operations
17+
- Added population control for auth `User` for extra security
18+
19+
### Fixed
20+
21+
- `User` auth was not serializing the `id` of the user in the mementifier config
1622

1723
## [3.3.0] => 2023-MAR-31
1824

models/auth/User.cfc

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,18 @@
1010
*/
1111
component
1212
accessors="true"
13-
delegates="Auth@cbSecurity,
14-
Authorizable@cbSecurity,
15-
JwtSubject@cbSecurity"
13+
transientCache="false"
14+
delegates="
15+
Auth@cbSecurity,
16+
Authorizable@cbSecurity,
17+
JwtSubject@cbSecurity
18+
"
1619
{
1720

1821
/**
22+
* --------------------------------------------------------------------------
1923
* Properties
24+
* --------------------------------------------------------------------------
2025
*/
2126
property name="id";
2227
property name="firstName";
@@ -27,7 +32,9 @@ component
2732
property name="roles";
2833

2934
/**
35+
* --------------------------------------------------------------------------
3036
* Validation constraints
37+
* --------------------------------------------------------------------------
3138
* https://coldbox-validation.ortusbooks.com/overview/valid-constraints
3239
*/
3340
this.constraints = {
@@ -38,18 +45,23 @@ component
3845
};
3946

4047
/**
48+
* --------------------------------------------------------------------------
4149
* Validation profiles
50+
* --------------------------------------------------------------------------
4251
* https://coldbox-validation.ortusbooks.com/overview/validating-constraints/validating-with-profiles
4352
*/
4453
this.constraintProfiles = { "update" : "firstName,lastName,username" };
4554

4655
/**
47-
* Mementifier serialization
56+
* --------------------------------------------------------------------------
57+
* Mementifier Serialization
58+
* --------------------------------------------------------------------------
4859
* https://forgebox.io/view/mementifier
4960
*/
5061
this.memento = {
5162
// Default properties to serialize
5263
defaultIncludes : [
64+
"id",
5365
"firstName",
5466
"lastName",
5567
"username",
@@ -62,6 +74,17 @@ component
6274
neverInclude : [ "password" ]
6375
};
6476

77+
/**
78+
* --------------------------------------------------------------------------
79+
* Population Control
80+
* --------------------------------------------------------------------------
81+
* https://coldbox.ortusbooks.com/readme/release-history/whats-new-with-7.0.0#population-enhancements
82+
*/
83+
this.population = {
84+
include : [], // if empty, tries to include them all
85+
exclude : [ "permissions", "roles" ] // These are not mass assignable
86+
}
87+
6588
/**
6689
* Constructor
6790
*/

0 commit comments

Comments
 (0)