Skip to content

Commit 33eab16

Browse files
committed
- Added guest() method to CBSecurity model and Authorizable delegate
1 parent 33e8d40 commit 33eab16

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

changelog.md

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

1010
## [Unreleased]
1111

12+
## [3.3.0] => 2023-MAR-31
13+
14+
### Added
15+
16+
- Added `guest()` method to CBSecurity model and `Authorizable` delegate
17+
1218
## [3.2.0] => 2023-MAR-29
1319

1420
### Added

models/CBSecurity.cfc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,13 @@ component threadsafe singleton accessors="true" {
250250
return getAuthService().isLoggedIn();
251251
}
252252

253+
/**
254+
* Verifies if a user is NOT logged in
255+
*/
256+
boolean function guest(){
257+
return !getAuthService().isLoggedIn();
258+
}
259+
253260
/**
254261
* Login Facade
255262
*

models/delegates/Authorizable.cfc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ component {
5252
return variables.cbSecurity.isLoggedIn();
5353
}
5454

55+
/**
56+
* Verifies if a user is NOT logged in
57+
*/
58+
boolean function guest(){
59+
return variables.cbSecurity.guest();
60+
}
61+
5562
/***************************************************************/
5663
/* Verification Methods
5764
/***************************************************************/

0 commit comments

Comments
 (0)