greenlight
greenlight copied to clipboard
AuthZ (FE): Added `AuthenticatedAndActiveOnly` & `UnauthenticatedOnly` protected routes.
Description
Added AuthenticatedAndActiveOnly & UnauthenticatedOnly protected routes.
Testing Steps
- Pull the code.
- Install the dependencies
bundle install && npm|yarn install
.- Clean the previous assets build by running
rm app/assets/builds/*
(This won't remove .keep since it's hidden).- Clean the database and tmp files for a better isolation by running
rails tmp:clear && rails db:schema:cache:clear && rails db:drop && rails db:create && rails db:migrate:with_data
- Run the linter and specs
bundle exec rubocop --parallel && bundle exec rspec && npx eslint app/javascript/* --ext .jsx,.js
- Run
./bin/dev
to run the assets builders processes and the Puma server all at once.
Screenshots (if appropriate):
I find the syntax slightly odd here - can we not create a component that does whatever checks is needed and then returns Route
instead? That way Route
and ProtectedRoute
are interchangeable?
I find the syntax slightly odd here - can we not create a component that does whatever checks is needed and then returns
Route
instead? That wayRoute
andProtectedRoute
are interchangeable?
Unfortunately, that seems to be unfeasible with the current version of react router. Will provide detailed explanation during today's meeting,
This is only an increment, The complete UX will be achieved once all subsequent PRs gets merged,
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication