mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-13 23:20:05 +00:00
chore(auth manager): tests fixing
This commit is contained in:
@@ -78,7 +78,16 @@ export class AuthManager {
|
||||
|
||||
if (isLoggedIn) {
|
||||
if (this.serverType === ServerType.Sas9) {
|
||||
await this.performCASSecurityCheck()
|
||||
const casSecurityCheckResponse = await this.performCASSecurityCheck()
|
||||
|
||||
if (isPublicAccessDenied(casSecurityCheckResponse.result)) {
|
||||
return {
|
||||
isLoggedIn: false,
|
||||
userName: this.userName || '',
|
||||
userLongName: this.userLongName || '',
|
||||
errorMessage: 'Public access has been denied.'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const { userName, userLongName } = await this.fetchUserName()
|
||||
@@ -150,7 +159,6 @@ export class AuthManager {
|
||||
if (isLoggedIn) {
|
||||
if (this.serverType === ServerType.Sas9) {
|
||||
const casSecurityCheckResponse = await this.performCASSecurityCheck()
|
||||
|
||||
if (isPublicAccessDenied(casSecurityCheckResponse.result)) {
|
||||
isLoggedIn = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user