Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Mar 31, 2023
2 parents 1dfd73e + 33eab16 commit 0571db3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name":"ColdBox Security",
"version":"3.2.0",
"version":"3.3.0",
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbsecurity/@build.version@/[email protected]@.zip",
"author":"Ortus Solutions.com <[email protected]>",
"slug":"cbsecurity",
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

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

### Added

- Added `guest()` method to CBSecurity model and `Authorizable` delegate

## [3.2.0] => 2023-MAR-29

### Added
Expand Down
7 changes: 7 additions & 0 deletions models/CBSecurity.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,13 @@ component threadsafe singleton accessors="true" {
return getAuthService().isLoggedIn();
}

/**
* Verifies if a user is NOT logged in
*/
boolean function guest(){
return !getAuthService().isLoggedIn();
}

/**
* Login Facade
*
Expand Down
7 changes: 7 additions & 0 deletions models/delegates/Authorizable.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ component {
return variables.cbSecurity.isLoggedIn();
}

/**
* Verifies if a user is NOT logged in
*/
boolean function guest(){
return variables.cbSecurity.guest();
}

/***************************************************************/
/* Verification Methods
/***************************************************************/
Expand Down

0 comments on commit 0571db3

Please sign in to comment.