Optimize the entity permission to permit mappings (#1642)
* Optimize the entity permission to permit mappings
In some cases, when a large number of entities are processed for
permission to permit mapping, the code would just hang without
indication of what went wrong. At least 2 `yield` would be needed
to process each entity. Over the course of 1000+ entities, the 2000
`yield` calls seem to cause problems.
The mapping code has been optimized to allow using a lookup cached
version. Now only a single `yield` is required. The change allows
1000+ entities to be processed successfully.
Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
* Setup `curryEntityPermissionsToUserPermits()`
Move from using `.cached()` to `curryEntityPermissionsToUserPermits()`
to make the form more explicit.
Fixed up the jsdoc on the util functions.
Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
* Minor changes
- fix typos in docs
- remove debug params in various places
- add curried permit mapping to `entityPermissionsToUserPermits()`
- use a consistent name of the curried function
Signed-off-by: Scott J Dickerson <sdickers@redhat.com>
Signed-off-by: Scott J Dickerson <sdickers@redhat.com>