Commit graph

28 commits

Author SHA1 Message Date
Dillon-Brown
ca2a8b413d Move Repositories
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:42 +01:00
Dillon-Brown
3aed1df849 Move all entities to component folders
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:41 +01:00
Dillon-Brown
1cab43c7d3 Rename src to backend
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:41 +01:00
Clemente Raposo
e8f9b18418 Move api documentation to /docs
- Enable swagger docs
- Disable re-doc
- Move rest docs path to /docs/rest
- Move graphql docs path to /docs/graphql
2021-03-30 19:22:39 +01:00
Dillon-Brown
9881af09e2 Update assets base path
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:37 +01:00
Dillon-Brown
95702c7854 Fix Symfony deprecations
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:33 +01:00
Dillon-Brown
6ba763e1c7 Set dev configuration to enable further web profiler features.
- This change causes the browser to stop before making any redirections, show the redirect URL, its toolbar, and its profiler.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:33 +01:00
Dillon-Brown
e82feb45b7 Update UserRepository and security.yaml to allow more control over user authentication
- Remove hardcoded property identifier to enable us to chose how users are identified.
- Remove user password encoding that isn't used in favour of using legacy users.
- Optimizing the container by removing unused services through service configs.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
7701f45b05 Implement doctrine migrations
- Setup doctrine migration configuration.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
8271d66178 Update User entity to match types with pre-existing legacy database
- Update User entity.
- Update schema_filters to only allow doctrine interaction with the users and migration_versions tables.
- Set auto_generate_proxy_classes to false since we don't need proxy classes.
- Updated broken ORM and doctrine mappings.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
4cd53cc6fd Refactor authentication to use application/json
- Sending by JSON is the preferred choice for API platform.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
a3aaa0c5fc Set web profiler config
- This will be automatically disabled in production environments

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Dillon-Brown
6734f26d98 Implement CSRF protection
- Remove outdated CSRF package
- Implement core CSRF protection

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:22:31 +01:00
Clemente Raposo
cd7c611069 Set symfony profiler to track exceptions only
- Avoid having huge volume of cached data
2021-03-30 19:21:38 +01:00
Clemente Raposo
f2bd9d9949 Improve session checks and cookie reset
- Clean CSRF token when session has expired
-- On the root path
-- On the session-check entrypoint
--- Needed since this invalidates the session

- Add new session token after expiring old session
-- On the session-check entrypoint
--- Needed as the following login requests will require a token

- Configure CSRF token generation on the session-status api
-- The session status can invalidate the session
-- It also cleans the tokens
-- We need to generate a new token afterwards
2021-03-30 19:21:37 +01:00
Dillon-Brown
3672c445e7 Create a UserChecker for pre/post authentication security
- Implement UserChecker to check user deletion status on pre/post auth.
- Modify LoginFormAuthenticator to use Symfony/Security to fetch user data.
- Add Security Exceptions: UserDeletedException, UserNotFoundException.
- Set the security firewall to run the UserChecker.
- Update User Entity with deleted getter.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:35 +01:00
Dillon-Brown
aa242f970c Implement user action menu
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:34 +01:00
Dillon-Brown
bc115670ba Add legacy user provider
- This changes the Symfony User entity to fetch the user from the legacy users table

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:34 +01:00
Dillon-Brown
9d484ed4a4 Linkup footer back to top with authentication
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:34 +01:00
Dillon-Brown
07cfbf4d37 Add default session expiration
- Sets default cookie lifetime to use PHP.ini value.
- Adds bn-ng-idle to handle idle user.
- Sets default timeout to 3600 seconds to log the user out and redirect to the login page.
- Displays a warning message to the user on session timeout.

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:34 +01:00
Clemente Raposo
0ff1c9072c Link data to login component
- Add language facade
- Add appStrings observable from facade
- Combine appStrings and systemConfigs into vm (viewModel)
- Link data to login component template
- Expose needed languages from the Users module
- Unprotect graphiql endpoint
2021-03-30 19:21:32 +01:00
Ross Moroney
ba67d839e3 Add language dropdown too login screen 2021-03-30 19:21:32 +01:00
Clemente Raposo
ac13d08e44 Enable GraphiQl docs
- Configure the assets folder to public
- Enable GraphiQl docs
2021-03-30 19:21:32 +01:00
Dillon-Brown
287ed2fb15 Add Angular CSRF protection 2021-03-30 19:21:31 +01:00
Dillon-Brown
9bff8530c6 Add Suite-8 user authentication 2021-03-30 19:21:31 +01:00
Clemente Raposo
58281a6b64 Implement ClassicView
Add FrontEnd api calls
- Add api method to retrieve classic view html
- Add apiUrl endpoint environment configuration
- Add Resolver to ClassicView routes

Implement FrontEnd component
- Add html and js rendering to classic view.

Add Classic View api-platform Entity and data provider

- Add ClassicViewData Dto with resource definition
- Add Classic controller with dummy html
- Declare controller in the services.yaml
2021-03-30 19:21:31 +01:00
Dillon-Brown
8cf555f4ee Update and audit existing project dependencies for Symfony/Flex.
- Converted all non-flex bundles with available bundles into Symfony/Flex.
- Updated namespaces to more closely match Symfony.
- Removed unnecessary dependencies and recipes.
- Executed Symfony/Flex recipes to create default configs.
- Improved composer.json scripts.
2021-03-30 19:21:31 +01:00
Dillon-Brown
587a79613e Add API Platform Framework with Symfony/Flex
This implements the basic structure that will be used for the API and core application.
2021-03-30 19:21:30 +01:00