Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
> As of v1.4.0, release candidates will be published in an effort to get new features out faster while still allowing
> time for full QA testing before moving the release candidate to a full release.

## v2.1.0-rc.7 [2025-03-10]

__What's New:__

* None

__Enhancements:__

* None

__Bug Fixes:__

* Fixed inverted `catalogAppDisplayName|catalogAppName` in `_set_available_profiles` and sped up generation.

__Dependencies:__

* None

__Other:__

* None

## v2.1.0-rc.6 [2025-03-06]

__What's New:__
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
beautifulsoup4
boto3
britive~=4.0
britive>=4.1.2,<5.0
certifi
charset-normalizer
click>=8.1.7
Expand Down
2 changes: 1 addition & 1 deletion src/pybritive/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.1.0-rc.6'
__version__ = '2.1.0-rc.7'
38 changes: 20 additions & 18 deletions src/pybritive/britive_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,32 +470,34 @@ def _set_available_profiles(self, from_cache_command=False, profile_type: Option
access_data['accesses']
) and len({a['papId'] for a in access_data['accesses']}) < access_limit:
increase += max(25, round(access_data['count'] * 0.25))
apps = {a['appContainerId']: a for a in access_data.get('apps', [])}
envs = {e['environmentId']: e for e in access_data.get('environments', [])}
profiles = {p['papId']: p for p in access_data.get('profiles', [])}
accesses = [
tuple([a['appContainerId'], a['environmentId'], a['papId']])
for a in access_data.get('accesses', [])
]
access_output = []
for access in access_data['accesses']:
appContainerId = access['appContainerId']
environmentId = access['environmentId']
papId = access['papId']
app = next((a for a in access_data.get('apps', []) if a['appContainerId'] == appContainerId), {})
environment = next(
(e for e in access_data.get('environments', []) if e['environmentId'] == environmentId), {}
)
profile = next((p for p in access_data.get('profiles', []) if p['papId'] == papId), {})
for app_id, env_id, profile_id in accesses:
app = apps[app_id]
env = envs[env_id]
profile = profiles[profile_id]
row = {
'app_name': app['catalogAppName'],
'app_id': appContainerId,
'app_type': app['catalogAppDisplayName'],
'app_name': app['catalogAppDisplayName'],
'app_id': app_id,
'app_type': app['catalogAppName'],
'app_description': app['appDescription'],
'env_name': environment['environmentName'],
'env_id': environmentId,
'env_short_name': environment['alternateEnvironmentName'],
'env_description': environment['environmentDescription'],
'env_name': env['environmentName'],
'env_id': env_id,
'env_short_name': env['alternateEnvironmentName'],
'env_description': env['environmentDescription'],
'profile_name': profile['papName'],
'profile_id': papId,
'profile_id': profile_id,
'profile_allows_console': app.get('consoleAccess', False),
'profile_allows_programmatic': app.get('programmaticAccess', False),
'profile_description': profile['papDescription'],
'2_part_profile_format_allowed': app['supportsMultipleProfilesCheckoutConsole'],
'env_properties': environment.get('profileEnvironmentProperties', {}),
'env_properties': env.get('profileEnvironmentProperties', {}),
}
if row not in access_output:
access_output.append(row)
Expand Down