n8n/packages/cli/test/unit/services
Iván Ovejero e4f041815a
perf(core): Cache roles (#6803)
* refactor: Create `RoleService`

* refactor: Refactor to use service

* refactor: Move `getUserRoleForWorkflow`

* refactor: Clear out old `RoleService`

* refactor: Consolidate utils into service

* refactor: Remove unused methods

* test: Add tests

* refactor: Remove redundant return types

* refactor: Missing utility

* chore: Remove commented out bit

* refactor: Make `Db.collections.Repository` inaccessible

* chore: Cleanup

* feat: Prepopulate cache

* chore: Remove logging

* fix: Account for tests where roles are undefined

* fix: Restore `prettier.prettierPath`

* test: Account for cache enabled and disabled

* fix: Restore `Role` in `Db.collections`

* refactor: Simplify by removing `orFail`

* refactor: Rename for clarity

* refactor: Use `cacheKey` for readability

* refactor: Validate role before creation

* refacator: Remove redundant `cache` prefix

* ci: Lint fix

* test: Fix e2e
2023-08-03 08:58:36 +02:00
..
cache.service.test.ts fix(core): Change VariablesService to DI and use caching (#6827) 2023-08-02 14:51:09 +02:00
events.service.test.ts refactor(core): Cache workflow ownership (#6738) 2023-07-31 11:37:09 +02:00
jwt.service.test.ts fix(core): Use JWT as reset password token (#6714) 2023-07-24 17:40:17 -04:00
ownership.service.test.ts perf(core): Cache roles (#6803) 2023-08-03 08:58:36 +02:00
redis.service.test.ts feat(core): Make Redis available for backend communication (#6719) 2023-08-02 12:51:25 +02:00
role.service.test.ts perf(core): Cache roles (#6803) 2023-08-03 08:58:36 +02:00