Giter Club home page Giter Club logo

bcbox's Introduction

BCBox

License Lifecycle:Maturing

Tests Maintainability Test Coverage

A frontend UI for managing access control to S3 Objects

To learn more about the Common Services available visit the Common Services Showcase page.

Directory Structure

.github/                   - PR, Issue templates and CI/CD
.vscode/                   - VSCode environment configurations
app/                       - Application Root
├── src/                   - Node.js web application
│   └── components/        - Components Layer
└── tests/                 - Node.js web application tests
chart/                     - General Helm Charts
└── bcbox/                 - BCBox Helm Chart Repository
    └── templates/         - BCBox Helm Chart Template manifests
frontend/                  - Frontend Root
├── src/                   - Node.js web application
│   ├── assets/            - Static File Assets
│   ├── components/        - Components Layer
│   ├── composables/       - Common composition elements
│   ├── interfaces/        - Typescript interface definitions
│   ├── lib/               - Repackaged external libraries
│   ├── router/            - Router Layer
│   ├── services/          - Services Layer
│   ├── store/             - Store Layer
│   ├── types/             - Typescript type definitions
│   ├── utils/             - Utility components
│   └── views/             - View Layer
└── tests/                 - Node.js web application tests
bcgovpubcode.yaml          - BCGov Public Code manifest
CODE-OF-CONDUCT.md         - Code of Conduct
COMPLIANCE.yaml            - BCGov PIA/STRA compliance status
CONTRIBUTING.md            - Contributing Guidelines
Dockerfile                 - Dockerfile Image definition
LICENSE                    - License
SECURITY.md                - Security Policy and Reporting

Documentation

Getting Help or Reporting an Issue

To report bugs/issues/features requests, please file an issue.

How to Contribute

If you would like to contribute, please see our contributing guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Forking & Self-hosting

If you intend to fork, host and support your own version of this application, please ensure that you re-brand the application's name and content. Please remove any notices, links or contact information and consider contributing new features back to this repository.

License

Copyright 2022 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

bcbox's People

Contributors

bcgv123 avatar jatindersingh93 avatar jujaga avatar kamorel avatar kyle1morel avatar loneil avatar norrisng-bc avatar timcsaky avatar wilwong89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

loneil bcgov jujaga

bcbox's Issues

The Top Delete Button Does Not Check Permissions

Describe the bug

On the Files page, the top delete button does not check to see if the user has the required permissions to delete the file before sending the call to COMS. This generates confusing messages to the user -- both an error and a successful delete message are shown.

To Reproduce

Steps to reproduce the behavior:

  1. Have READ only permissions granted on a file or bucket to you
  2. Select the checkbox to the left of the file
  3. Use the delete button at the top of the screen
  4. See error and success messages
    image

Expected behavior

After clicking the delete button, BCBox should check the user's permissions and if they don't have them should generate a message to the user alerting them. BCBox should only send a delete request to COMS if the user has the required permissions.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version: 117.0.2045.31

Select all toggle, selects ALL items in BC Box (including not visible items on other pages)

Describe the bug

When you toggle the "select all" radio button, it selects all the items on the BC Box bucket. Applying any action to this selection applies it to everything in the bucket.

ie. Deleting (a page of items) deletes all the items in the bucket

Expected behavior

Apply action to the selected items on the current page (not the entire bucket)
This would match the UX of other sites, as to not delete items that are not visible on the current page

Add project lifecycle badge

No Project Lifecycle Badge found in your readme!

Hello! I scanned your readme and could not find a project lifecycle badge. A project lifecycle badge will provide contributors to your project as well as other stakeholders (platform services, executive) insight into the lifecycle of your repository.

What is a Project Lifecycle Badge?

It is a simple image that neatly describes your project's stage in its lifecycle. More information can be found in the project lifecycle badges documentation.

What do I need to do?

I suggest you make a PR into your README.md and add a project lifecycle badge near the top where it is easy for your users to pick it up :). Once it is merged feel free to close this issue. I will not open up a new one :)

Adding Object Permissions Fails

Describe the bug

Adding permissions on an object fails with an AxiosError: Request failed with status code 422

To Reproduce

Steps to reproduce the behavior:

  1. Open a Bucket with an Object
  2. Click the Object Permissions button
  3. Add a permission to a user
  4. See error

Expected behavior

Permission should be added without an error.

Screenshots

Screenshot 2023-09-14 102317 Screenshot 2023-09-14 102433 Screenshot 2023-09-14 102412

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version: 116.0.1938.81

Add missing topics

TL;DR

Topics greatly improve the discoverability of repos; please add the short code from the table below to the topics of your repo so that ministries can use GitHub's search to find out what repos belong to them and other visitors can find useful content (and reuse it!).

Why Topic

In short order we'll add our 800th repo. This large number clearly demonstrates the success of using GitHub and our Open Source initiative. This huge success means it's critical that we work to make our content as discoverable as possible. Through discoverability, we promote code reuse across a large decentralized organization like the Government of British Columbia as well as allow ministries to find the repos they own.

What to do

Below is a table of abbreviation a.k.a short codes for each ministry; they're the ones used in all @gov.bc.ca email addresses. Please add the short codes of the ministry or organization that "owns" this repo as a topic.

add a topic

That's it, you're done!!!

How to use

Once topics are added, you can use them in GitHub's search. For example, enter something like org:bcgov topic:citz to find all the repos that belong to Citizens' Services. You can refine this search by adding key words specific to a subject you're interested in. To learn more about searching through repos check out GitHub's doc on searching.

Pro Tip 🤓

  • If your org is not in the list below, or the table contains errors, please create an issue here.

  • While you're doing this, add additional topics that would help someone searching for "something". These can be the language used javascript or R; something like opendata or data for data only repos; or any other key words that are useful.

  • Add a meaningful description to your repo. This is hugely valuable to people looking through our repositories.

  • If your application is live, add the production URL.

Ministry Short Codes

Short Code Organization Name
AEST Advanced Education, Skills & Training
AGRI Agriculture
ALC Agriculture Land Commission
AG Attorney General
MCF Children & Family Development
CITZ Citizens' Services
DBC Destination BC
EMBC Emergency Management BC
EAO Environmental Assessment Office
EDUC Education
EMPR Energy, Mines & Petroleum Resources
ENV Environment & Climate Change Strategy
FIN Finance
FLNR Forests, Lands, Natural Resource Operations & Rural Development
HLTH Health
IRR Indigenous Relations & Reconciliation
JEDC Jobs, Economic Development & Competitiveness
LBR Labour Policy & Legislation
LDB BC Liquor Distribution Branch
MMHA Mental Health & Addictions
MAH Municipal Affairs & Housing
BCPC Pension Corporation
PSA Public Service Agency
PSSG Public Safety and Solicitor General
SDPR Social Development & Poverty Reduction
TCA Tourism, Arts & Culture
TRAN Transportation & Infrastructure

NOTE See an error or omission? Please create an issue here to get it remedied.

Ability to Delete Bucket

Is your feature request related to a problem? Please describe.

Through testing, I've created several buckets which aren't needed. Having all these unused buckets clutters the homepage.

Describe the solution you'd like

The ability to delete a bucket. Ideally this should have a prompt to confirm the deletion. There should be a check to see if there are files in the bucket and prevent the deletion with a nice message.

Describe alternatives you've considered

I haven't looked at alternatives, if there are other ways to do this that could be included in the documentation that would be great.

Upload Fails (False complete notification)

Describe the bug

Uploading a file fails. Consistently fails, I have tried 3 times.

To Reproduce

Test File: https://releases.ubuntu.com/22.04.3/ubuntu-22.04.3-desktop-amd64.iso
I am currently using the above file but I have many other zip files to test with.

Uploading this Ubuntu ISO triggers "Complete" notification but fails to upload. The file is not presented in BC Box or in our bucket (checking using S3 Browser).

Screenshots

image

Desktop (please complete the following information):

I am uploading from local disk C to BC Box using a remote desktop via citrix.

Object Ids are Cached after Deletion

Describe the bug

After deleting a file using the checkbox and delete button at the top and subsequently trying to download or delete using the top buttons cause errors as BCBox is trying to download/delete the original object id.

To Reproduce

Steps to reproduce the behavior:

  1. Go to a bucket
  2. Upload a file
  3. Select the checkbox to the left of the file name
image
  1. Use the Delete button at the top (next to the Upload and Download buttons)
  2. File is deleted
  3. Use the Download or Delete buttons at the top
  4. Error is encountered

Trying to download a file after deleting it: image
Trying to delete a file after deleting it:

  • image
  • image

Expected behavior

The Download and Delete buttons should not retain previous Object Ids after they have been deleted.

Screenshots

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version: 117.0.2045.31

Lets use common phrasing

TL;DR 🏎️

Teams are encouraged to favour modern inclusive phrasing both in their communication as well as in any source checked into their repositories. You'll find a table at the end of this text with preferred phrasing to socialize with your team.

Words Matter

We're aligning our development community to favour inclusive phrasing for common technical expressions. There is a table below that outlines the phrases that are being retired along with the preferred alternatives.

During your team scrum, technical meetings, documentation, the code you write, etc. use the inclusive phrasing from the table below. That's it - it really is that easy.

For the curious mind, the Public Service Agency (PSA) has published a guide describing how Words Matter in our daily communication. Its an insightful read and a good reminder to be curious and open minded.

What about the master branch?

The word "master" is not inherently bad or non-inclusive. For example people get a masters degree; become a master of their craft; or master a skill. It's generally when the word "master" is used along side the word "slave" that it becomes non-inclusive.

Some teams choose to use the word main for the default branch of a repo as opposed to the more commonly used master branch. While it's not required or recommended, your team is empowered to do what works for them. If you do rename the master branch consider using main so that we have consistency among the repos within our organization.

Preferred Phrasing

Non-Inclusive Inclusive
Whitelist => Allowlist
Blacklist => Denylist
Master / Slave => Leader / Follower; Primary / Standby; etc
Grandfathered => Legacy status
Sanity check => Quick check; Confidence check; etc
Dummy value => Placeholder value; Sample value; etc

Pro Tip 🤓

This list is not comprehensive. If you're aware of other outdated nomenclature please create an issue (PR preferred) with your suggestion.

"Application Readme" is missing

Describe the bug

The main README.md document referes to an "Application README.md". However, when I click the Application README.md link, I get a 404. Additionally, when I search the entire project for README.md files, I only see a frontend one, not an Application README.

Thank you.

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'https://github.com/bcgov/bcbox/blob/master/README.md'
  2. Click on 'Application README link'
  3. See 404

Expected behavior

An application specific README

Desktop (please complete the following information):

Mac OSX, Chrome

Restrict sharing files publicly

Is your feature request related to a problem? Please describe.

There are concerns with how easy it is to make files publicly accessible. It is currently just one click to make a file publicly accessible, and some users might click the button inadvertently. Even having a confirmation box might not be enough as some users are trained to click through dialog boxes without fully reading them.

Describe the solution you'd like

Make sharing files publicly more difficult:

  • a setting at the bucket level to allow/disallow files being shared publicly; or
  • new user permission to be able to set files to public

Bucket Details are not accurate

Describe the bug

The bucket details button appears to be caching the Managed by section and if different buckets have different "managers" this detail is lost.

To Reproduce

Steps to reproduce the behavior:

  1. Have multiple buckets configured with different permissions -- one bucket should have one user with Manage privileges (bucket A) and one bucket should have two users with Manage privileges (bucket B)
  2. Click on the bucket details button (i) for bucket A. Verify it shows Managed by with only one user
  3. Click on the bucket details button (i) for bucket B. Verify it shows Managed by with two users
  4. Click on the bucket details button (i) for bucket A. Managed by now shows two users (the users from bucket B)

Expected behavior

The bucket details button should retrieve the Managed By privileges each time the button is used, the application appears to be caching the results currently.

Screenshots

1: 1
1a: 1a
1b: 1b
2: 2
3: 3
4: 4

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Edge
  • Version: 114.0.1823.43

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.