Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated ENABLE_RESTRICTED_APP_ACCESS for potential list value #1107

Merged
merged 4 commits into from
Oct 30, 2024

Conversation

ckrew
Copy link
Contributor

@ckrew ckrew commented Oct 28, 2024

Description

Currently the ENABLE_RESTRICTED_APP_ACCESS is set to be a boolean. If False, all apps are accessible to everyone. If True, then no apps are accessible unless given explicit permissions. This causes an issue if I only want 1 or a few apps restricted and leave the rest accessible to everyone.

This PR aims to fix that by maintaining previous capabilities of a boolean value but also adding the option to provide a list of restricted applications. If an application is provided in the list, then that application will only be accessible by admins and those given explicit permissions.

Changes Made to Code:

  • Added logic to the existing utilities function that checks for apps in a restricted list if the setting is a list

Additional Notes

  • No expected results had to be changed in tests which means it should not cause any breaking issues in current portals

Quality Checks

  • New code is 100% tested
  • Code has been formated
  • Code has been linted
  • Docstrings for new methods have been added

…ain original functionality with boolean if desired

if an app is in the given list, then it cannot be access unless given explicit permissions
added tests
@coveralls
Copy link

coveralls commented Oct 28, 2024

Coverage Status

coverage: 100.0%. remained the same
when pulling 1bdf319 on restricted_app_access_list
into da1d12a on main.

@swainn swainn requested review from swainn and sdc50 October 28, 2024 23:05
Copy link
Member

@swainn swainn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I want @sdc50 to review and comment since the impetus for this feature originally came from his needs.

@sdc50
Copy link
Member

sdc50 commented Oct 30, 2024

I don't have a direct need for this capability currently, but I can see how it could be useful. It seems to work well for me with both native and proxy apps.

@sdc50 sdc50 merged commit 4267324 into main Oct 30, 2024
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants