forked from jfrog/jfrog-cli-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move JAS to its own utils source file jfrog#1035
- Loading branch information
1 parent
d5a9ef1
commit 13ddab4
Showing
2 changed files
with
17 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package utils | ||
|
||
import ( | ||
clientutils "github.com/jfrog/jfrog-client-go/utils" | ||
"github.com/jfrog/jfrog-client-go/utils/log" | ||
"github.com/jfrog/jfrog-client-go/xray" | ||
) | ||
|
||
func IsEntitledForJas(xrayManager *xray.XrayServicesManager, xrayVersion string) (entitled bool, err error) { | ||
if e := clientutils.ValidateMinimumVersion(clientutils.Xray, xrayVersion, EntitlementsMinVersion); e != nil { | ||
log.Debug(e) | ||
return | ||
} | ||
entitled, err = xrayManager.IsEntitled(ApplicabilityFeatureId) | ||
return | ||
} |