Commit graph

3126 commits

Author SHA1 Message Date
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
81c1768af8 Update session expiration logic
- Fix a duplicate session expiry message
- Update application logic to handle request chaining

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:35 +01:00
Clemente Raposo
d9e27111d3 Re-direct login routes to home page whe user is logged in
- Add login auth guard
-- Check if session is active on front end, if so go to home page
-- Check if session is active on backed, if so go to home page
-- Otherwise stay on login
- Add loaded flag to AppStateFacade to:
-- Know if the page has already been loaded
-- Avoid doing an extra request to the backed if we logged out on the frontend
- Enable angular router onSameUrlNavigation to:
-- Allow refreshing pages
-- Properly updating url when trying to go from home to login, which goes back to home
2021-03-30 19:21:35 +01:00
Clemente Raposo
00d8330f39 Add session status check to classic view
- Check session when moving between classic views
-- Update backend session-status entry point to also check legacy session
- Check if classic view iframe was re-directed to login page
- Logout user in the above
- Add conditional redirect to auth service logout
- Add key based loading to fix issues with loading on logout.
- Update jasmine tests
2021-03-30 19:21:34 +01:00
Clemente Raposo
b2c30d9c98 Fix multiple submission errors on login component
- Add button-loading directive to update button according to loading state
-- Add ability to listen to AppStateFacade loading state
-- Add ability to listen to loading input from parent component
- Add jasmine unit tests

- Fix action-name-mapper jasmine unit tests
2021-03-30 19:21:34 +01:00
Dillon-Brown
145ee25dc5 Update FieldDefinitionHandlerTest to remove starting the legacy app
- This fixes an issue with trying to destroy a non-existing session

Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:34 +01:00
Dillon-Brown
76744d36b7 Add module vardef entity and data providers
Signed-off-by: Dillon-Brown <dillon.brown@salesagility.com>
2021-03-30 19:21:34 +01:00
Clemente Raposo
5d6aa45391 Add Route conversion on legacy
- Add legacy handler to access RouteConverter
- Add legacy handler to access ModuleNameMapper
- Add legacy handler to access ActionNameMapper
- Remove action and module name maps from Suite8 side

- Update frontend route converter to check for suite 8 routes
-- When link is a suite 8 route does not convert

- Add LegacyScopeState to allow for nested legacy handler calls
-- Add abstract getHandlerKey to base LegacyHandler
-- Implement getHandlerKey on all legacy handlers

- Update legacy handler init and close methods to use scope state
-- Check if withing an already open legacy handler scope
2021-03-30 19:21:34 +01:00
Clemente Raposo
3931ce40fa Add Route conversion on legacy - Legacy changes
- Move RouteConverter to legacy
- Move ModuleNameMapper to legacy
- Move ActionNameMapper to legacy
- Add smarty function to convert links
- Convert legacy links into Suite 8 links
-- Change mvc_utils::ajaxLink for most common links
-- Change ListViewGeneric links for list view links
-- Change DashletGenericDisplay for common dashlet links
2021-03-30 19:21:34 +01:00
Clemente Raposo
c1ef13322a Add legacy non-view actions re-direction
- Listen to legacy non-view calls on the LegacyRedirectListener
- Add LegacyNonViewActionRedirectHandler to re-direct to legacy
-- Using 307 re-direction response to support post re-direction
- Add unit test for LegacyNonViewActionRedirectHandler
2021-03-30 19:21:34 +01:00
Clemente Raposo
6c3e266b5d Add legacy api re-direction
- Listen to legacy api calls on the LegacyRedirectListener
- Add LegacyApiRedirectHandler to re-direct to legacy endpoint
-- Using 307 re-direction response to support post re-direction
-- Using api_paths.yaml with the configuration with paths to check

- Setup API tests using codeception
-- Add helper methods to login in v4 and v8 API
- Add Api test to create account using v4 api
- Add Api test to create account using v8 api
- Add unit test for LegacyApiRedirectHandler
2021-03-30 19:21:34 +01:00
Clemente Raposo
2a489cbc7e Add fallback value to frontend action name mapper
- When not mapped, fallback to provided value
- Add ShowDuplicates to action_name_map
2021-03-30 19:21:34 +01:00
Clemente Raposo
023ae68e38 Adjust ClassicView Iframe auto-resizing calculations
- Update initial adjustements to use same calculations
- Update calc to use window height when content is smaller
2021-03-30 19:21:34 +01:00
Clemente Raposo
e575f5d36d Update Action Name Map
- map about action
2021-03-30 19:21:34 +01:00
Clemente Raposo
4a4372d1e1 Update user provider
- Minor fix: allow for null user first name and last name
2021-03-30 19:21:34 +01:00
Clemente Raposo
e147faf3a1 Implement ClassicView
- Change Classic view component to use Iframe to render legacy view for specified url
- Add Iframe page change observer to detect page changes and route to appropriate view
-- Move legacy to suite8 route conversion to the front end
- Add Iframe resize observer to re-adjust the iframe size according to its contents
- Expose module and action name maps to the frontend within thee system configs
- Add unit and karma tests and ajdust existing ones
- Add floating to messages alert
- Make classic view resolver extend the base metadata resolver
- Move all front end calls to the default_module config to a single place
- Map default module name to frontend name in the legacy handler
2021-03-30 19:21:34 +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
Mac-Rae
f488ae2c8c Update readme to be more up-to-date
- Lose outdated img link
- Update licence to look within legacy
- Correct formatting with Requirements table
- Update installation to follow new changes
- Remove steps involving standalone database
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
Clemente Raposo
b5828346bf Add responsive styling for custom logo
- Add styling to display default logo and custom logo properly in desktop and responsive layouts
- Fix responsive layout for language
-- Adjust html
-- Adjust select css for login component
- Fix responsive layout for footer
2021-03-30 19:21:34 +01:00
Clemente Raposo
25f7d38fcd Add legacy suite configuration support for grouped tabs
- Add ability to fully start legacy app on legacy handlers
- Update Navbar and UserPreferences handler to start the legacy app after init
- Update Navbar and UserPreferences handler to implement the corresponding interfaces
-- Update corresponding Data providers to use the new interfaces

- Change Navbar legacy handler to take into account the tab configured preferences
-- based on the implementation used in Legacy SugarView

- Update UserPreferences to use the currently logged in user
-- remove hard coded user
-- get UserPreferences from the legacy User object instead of grabbing it directly from the db

- Add All entry to grouped tabs

- Adjust unit tests
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
Clemente Raposo
ca47dded0a Fix Password Recovery messages
- Catch missing exception
- Add extra exception handling on the backend and send error back to front end.
- Handler errors on the front-end and show message.
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
7195848d86 Fix navbar rendering
- Fix: items still being displayed when navigation cache is cleared
- Fix: duplicate entries were added to the more dropdown

- Move the ready checks to the navbar abstract
- Move the display type decision logic to the navbar abstract
- Add ready method to be easier to check if dependencies are loaded
- Cleanup
-- add js doc
-- format code
2021-03-30 19:21:34 +01:00
Clemente Raposo
77c7057328 Expire Suite 8 session when Suite 7 expires
- Check Suite7 session on authenticated endpoints
-- Decorate Security Stage for Graphql
-- Decorate DenyAccessListener for REST
-- Add legacy handler method to check the suite 7 session
- Add Unit tests
2021-03-30 19:21:34 +01:00
Clemente Raposo
e8480b47b5 Re-direct to login upon backend logout
- Add graphql afterware to watch for errors
-- on Access Denied logout user
- Decouple AuthService logout from logout component
-- Get translated messages
- Clear cache upon logout
-- Add StateFacade interface
-- Add clear methods to interface
--- Add deep cloning of internal state to avoid errors
-- Add StateManager
- Adjust existing karma tests
- Add auth karma tests
2021-03-30 19:21:34 +01:00
Clemente Raposo
59c3efd08c Add Suite 8 LogoutListener
- Add LegacySessionLogoutHandler
-- Logout Legacy Suite session when Suite 8 is logged out
-- Configure handler to decorate SessionLogoutHandler
- Add logout to Authentication legacy handler
- Add AspectMock lib
- Add unit tests for LegacySessionLogoutHandler
- Rename unit test folders to be consistent with src.
-- Use the same pattern used in Suite 7
2021-03-30 19:21:33 +01:00
Clemente Raposo
895ec5b4f7 Add ThemeImages API
- Add ThemeImages Entity
- Add ThemeImages DataProvider
- Add ThemeImage Service
-- Retrieves the list of images for a given theme
- Add ThemeImagesFinder
-- looks up for images inside a given path
-- Add configuration to specify theme image paths
-- Add configuration to specify supported image types
- Add unit tests
- Add theme-images angular facade
- Update base metadata resolver to load theme images
-- Move UserPreferences loading ot base metadata resolver
-- Loaded theme images after user preference and config loading
--- uses default_theme, if user preferences weren't loaded
-- Add jasmine tests
- Add scrm-image component
-- Add jasmine tests
- Replace usages of svg-icon with image component
-- Fix jasmine tests
- Adjust UserPreference interface to match the current data
2021-03-30 19:21:33 +01:00
Dillon-Brown
3f133b64db Add test for login failure status 2021-03-30 19:21:33 +01:00
Dillon-Brown
b8d9afb4ae Linkup login redirect to system config 2021-03-30 19:21:33 +01:00
Ross Moroney
6b2c10092d Add user preferences api and legacyhandler 2021-03-30 19:21:33 +01:00
Clemente Raposo
1ab3d65b36 Add Recover Password
- Add ResetPassword Legacy Handler
- Add recover password angular service
- Add front end validation to login component
- Trigger password recovery call from fronted
2021-03-30 19:21:33 +01:00
Clemente Raposo
9449fe037f Add Process API
- Add Process entity
- Add ProcessDataPersister to allow submitting process requests
- Add Process Collection and Item Data providers
- Add ProcessHandlerInterface to be implemented by process handlers
- Add ProcessHandlerRegistry to key based access to process handlers
-- Add tagged and key based service collection injection
--- to auto inject services implementing the ProcessHandlerInterface
--- Auto tag all services implementing the ProcessHandlerInterface
- Add angular service for processes
- Add Authentication check before running process
- Add GQL record mutation
2021-03-30 19:21:33 +01:00
Clemente Raposo
eb397fba2f Add security to Langauge resources 2021-03-30 19:21:33 +01:00
Dillon-Brown
c430dacbfc Add a success message to logout component 2021-03-30 19:21:33 +01:00
Dillon-Brown
9a56976b7d Refactor auth service 2021-03-30 19:21:33 +01:00
Clemente Raposo
a8235c444a Add Navbar translations
- Make language facade loading dynamic to load given types of strings
-- Add cache per type of language strings
-- Add configuration per type of language strings
-- Enable fetching modStrings, appStrings, appListStrings
- Expose a stream for each type of strings

- Make BaseMetadataResolver language loading dynamic based on router configuration
-- Add navigation loading
-- add string loading, depending on configuration
-- Add default configuration: Loads SystemConfigs, Navigation and all Languages
-- Add ability to override default configuration on router
- Configure BaseMetadata resolver in router
- Only use default language if it there is no active language

- Update login component to cope with changes to language facade

- Refactor: move existing facades to the facades folder

- Re-write navigation facade to use reactive facades approach

- Update navbar api to cope with with api contract
-- Add modules entry
-- Move moduleSubmenus to modules entry
-- Disable collection query on graphql
-- Update frontend to cope with these changes

- Update navbar component
-- Cleanup component
-- Fetch navigation and languages reactively
-- Update navbar menu item creation with new navigation structure
-- Fix html for loading icons
-- Fix html for regular module tab menu

- Translate navbar items
-- Add translations on navbar menu items creation

- Add karma tests

- Adjust navbar to properly render links
-- Add extra query params to submenu in API
-- Adjust LegacyHandler to retrieve the extra query params
-- Adjust angular component
2021-03-30 19:21:33 +01:00
Clemente Raposo
62b05e18fe Add ability to disable legacy suite translations on legacy handlers
- Add sugar config disable_translations entry
- Return language_key > language_key map when fetching languages and disable_translations is enabled
-- app_strings
-- app_list_strings
-- mod_strings
2021-03-30 19:21:33 +01:00
Clemente Raposo
968580e0fe Add ModStrings API
- Add ModStrings entity
- Add ModStringsItemDataProvider with sample data
- Add ModStrings Legacy handler
- Add unit tests for legacy handler
2021-03-30 19:21:33 +01:00
Ross Moroney
bc24427738 Add language to frontend template 2021-03-30 19:21:33 +01:00
Clemente Raposo
ec5688c2e0 Add support for extra query parameters on classic view
- Update ClassicView Graphql API
-- add custom query for retrieving the classic view
-- add custom resolver

- Add ClassicView legacy handler

- Update ClassicView angular rendering
-- add classic view facade
-- add classic-view graphql query
-- remove rest classic-view request

- Update ClassicView angular resolver
-- send information about extra query params

- Add custom router re-use strategy
-- Allow configuring if a given route should be re-used
-- Disable re-usage in classic view routes
2021-03-30 19:21:33 +01:00
Dillon-Brown
3bce817795 Set security attributes for API calls 2021-03-30 19:21:33 +01:00
Dillon-Brown
d0853049ba Implement logout functionality 2021-03-30 19:21:33 +01:00
Clemente Raposo
baae4e2129 Add Legacy asset re-direction
- Add handler to check and build re-direction path
- Re-direct legacy assets on LegacyRedirectListener
- Add configuration with list of legacy asset paths
- Add dummy image call to the ClassicViewItemDataProvider
2021-03-30 19:21:33 +01:00
Clemente Raposo
32f6ddd81b Add forgot password inputs to login component
- Add forgot password form inputs
- Add card flipping using fade
-- Add ng-animations lib
- Expose email appStrings label
- Only show forgot password when enabled on the backend
2021-03-30 19:21:33 +01:00
Clemente Raposo
3efa62fc42 Dynamically show language dropdown on login component
- Only show when more than one language is installed
2021-03-30 19:21:32 +01:00
Clemente Raposo
c61d3209e4 Simplify facades and add caching
- Simplify and standardize SystemConfigs and Language facades
- Add observable stream caching
- Simplify observable stream usage on login component
2021-03-30 19:21:32 +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