set webapi optional

This commit is contained in:
tickstep 2024-04-01 22:46:24 +08:00
parent 03f3d37fb8
commit 4769d17281
2 changed files with 6 additions and 3 deletions

View File

@ -411,6 +411,9 @@ func (c *PanConfig) ActiveUser() *PanUser {
u.panClient = user.panClient
u.Nickname = user.Nickname
if u.ActiveDriveId == "" {
u.ActiveDriveId = user.DriveList.GetFileDriveId()
}
u.DriveList = user.DriveList
// check workdir valid or not
if user.IsFileDriveActive() {

View File

@ -119,9 +119,9 @@ func SetupUserByCookie(openapiToken, webapiToken *PanClientToken, ticketId, user
if openapiToken == nil {
return nil, apierror.NewFailedApiError("openapi token is empty")
}
if webapiToken == nil {
return nil, apierror.NewFailedApiError("webapi token is empty")
}
//if webapiToken == nil {
// return nil, apierror.NewFailedApiError("webapi token is empty")
//}
doOpenLoginAct:
// setup openapi client