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

Improve Bucket Policy Code Ideas (Use Enum) #8697

Open
shirady opened this issue Jan 16, 2025 · 0 comments
Open

Improve Bucket Policy Code Ideas (Use Enum) #8697

shirady opened this issue Jan 16, 2025 · 0 comments

Comments

@shirady
Copy link
Contributor

shirady commented Jan 16, 2025

Environment info

  • NooBaa Version: 5.18.0 (current, master)
  • Platform: not relevant

Actual behavior

  1. We better create an enum and reuse it for theeffect and permission part instead of using the strings, for example:
    if (res_arr_deny.every(item => item)) return 'DENY';

if (res_arr_allow.every(item => item)) return 'ALLOW';

Expected behavior

  1. Use enum for better readability and avoid any typo that might happen in the permission.

Steps to reproduce

  1. not relevant

More information - Screenshots / Logs / Other output

Also need to update the test with this change, for example: test_s3_bucket_policy.js

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

No branches or pull requests

1 participant