File tree Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Expand file tree Collapse file tree 3 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ build-backend = "hatchling.build"
66
77[project ]
88name = " socketsecurity"
9- version = " 2.2.17 "
9+ version = " 2.2.18 "
1010requires-python = " >= 3.10"
1111license = {"file" = " LICENSE" }
1212dependencies = [
Original file line number Diff line number Diff line change 11__author__ = 'socket.dev'
2- __version__ = '2.2.17 '
2+ __version__ = '2.2.18 '
33USER_AGENT = f'SocketPythonCLI/{ __version__ } '
Original file line number Diff line number Diff line change @@ -98,6 +98,27 @@ def main_code():
9898 sys .exit (3 )
9999
100100 log .info (f"All required dependencies found: { ', ' .join (found_deps )} " )
101+
102+ # Check if organization has an enterprise plan
103+ log .info ("Checking organization plan for reachability analysis eligibility..." )
104+ org_response = sdk .org .get (use_types = True )
105+ organizations = org_response .get ("organizations" , {})
106+
107+ if organizations :
108+ org_id = next (iter (organizations ))
109+ org_plan = organizations [org_id ].get ('plan' , '' )
110+
111+ # Check if plan matches enterprise* pattern (enterprise, enterprise_trial, etc.)
112+ if not org_plan .startswith ('enterprise' ):
113+ log .error (f"Reachability analysis is only available for enterprise plans." )
114+ log .error (f"Your organization plan is: { org_plan } " )
115+ log .error ("Please upgrade to an enterprise plan to use reachability analysis." )
116+ sys .exit (3 )
117+
118+ log .info (f"Organization plan verified: { org_plan } " )
119+ else :
120+ log .error ("Unable to retrieve organization information for plan verification." )
121+ sys .exit (3 )
101122
102123 # Parse files argument
103124 try :
You can’t perform that action at this time.
0 commit comments