skip interstitial on drive shares (#704)

This commit is contained in:
Michael Quigley 2024-07-25 11:37:20 -04:00
parent c3cf0f8668
commit e0b467fab0
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -133,10 +133,15 @@ func (h *shareHandler) Handle(params share.ShareParams, principal *rest_model_zr
logrus.Infof("added frontend selection '%v' with ziti identity '%v' for share '%v'", frontendSelection, sfe.ZId, shrToken)
}
}
skipInterstitial, err := str.IsAccountGrantedSkipInterstitial(int(principal.ID), trx)
if err != nil {
logrus.Errorf("error checking skip interstitial for account '%v': %v", principal.Email, err)
return share.NewShareInternalServerError()
var skipInterstitial bool
if backendMode != sdk.DriveBackendMode {
skipInterstitial, err = str.IsAccountGrantedSkipInterstitial(int(principal.ID), trx)
if err != nil {
logrus.Errorf("error checking skip interstitial for account '%v': %v", principal.Email, err)
return share.NewShareInternalServerError()
}
} else {
skipInterstitial = true
}
shrZId, frontendEndpoints, err = newPublicResourceAllocator().allocate(envZId, shrToken, frontendZIds, frontendTemplates, params, !skipInterstitial, edge)
if err != nil {