Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(auth): Various build improvements and minor refactoring #2959

Closed
wants to merge 57 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
591792e
build(devel): Add a proxy hosting testbed
rpatterson May 26, 2021
a54a425
build(devel): Improve browsing API source code
rpatterson Jun 16, 2021
fb65481
build(devel): Wrong checkout default branch name
rpatterson Jun 16, 2021
27c65ca
docs(redux): Order folder structure per frameworks
rpatterson Jun 23, 2021
5f5e782
refactor(user): Factor user session state to selectors
rpatterson Jun 17, 2021
ee9cf27
refactor(actions): Easier action lookup by id
rpatterson Jun 21, 2021
faec2ae
fix(auth): UI logged-in detection for other auths
rpatterson Jun 21, 2021
e1fb3cb
Merge branch 'master' into fix-auth-unified-login
sneridagh Jun 26, 2021
31b026a
Merge branch 'master' into fix-auth-unified-login
sneridagh Jul 7, 2021
b92c67b
Fix prettier issues
sneridagh Jul 7, 2021
ca0b83f
build(semver): React props changes break custom
rpatterson Jul 14, 2021
4ec73ba
build(devel): Isolate Trafik proxy make testbed
rpatterson Jul 14, 2021
54d6883
Merge branch 'master' into fix-auth-unified-login
tisto Jul 17, 2021
e48de09
Merge branch 'master' into fix-auth-unified-login
sneridagh Sep 13, 2021
3b38635
Merge branch 'master' into fix-auth-unified-login
sneridagh Sep 21, 2021
ae88d91
Merge branch 'master' into fix-auth-unified-login
sneridagh Sep 21, 2021
04eee9c
Fix toolbar flash in initial state
sneridagh Sep 21, 2021
ef0b138
Fix @types missing
sneridagh Sep 21, 2021
1dcd0e4
Action should be a thunk...
sneridagh Sep 21, 2021
ffbaa4a
build(make): Reduce noise for doc/help target
rpatterson Dec 9, 2021
f9aed95
test(api): Restore test runner, ref'ed in Makefile
rpatterson Dec 9, 2021
412dfd6
build(make): Reduce build times, incremental
rpatterson Dec 9, 2021
e9946b0
Merge remote-tracking branch 'origin/master' into fix-flashy-toolbar-…
rpatterson Dec 10, 2021
aa42be0
docs(make): Consistent terminology hyphenation
rpatterson Dec 10, 2021
fd8ef01
build(proxy): Improve proxy testbed usage
rpatterson Dec 10, 2021
59a2bc6
Merge branch 'master' into build-rpatterson-improve-local-devel
sneridagh Dec 11, 2021
21f701c
Merge branch 'master' into build-rpatterson-improve-local-devel
sneridagh Dec 11, 2021
815fe06
Merge remote-tracking branch 'origin/master' into build-rpatterson-im…
rpatterson Dec 13, 2021
b6fffce
build(checkout): Cleanup merged branch reference
rpatterson Dec 13, 2021
520bc28
build(version): Fix version constraint conflicts
rpatterson Dec 13, 2021
9df9d4c
build(version): Improve version conflict resolution
rpatterson Dec 13, 2021
bf76714
Merge remote-tracking branch 'origin/master' into build-rpatterson-im…
rpatterson Dec 16, 2021
0594c16
build(deps): Constrain, pin, upgrade API versions
rpatterson Dec 16, 2021
3574ef6
build(clean): Fix clean checkout build issues
rpatterson Dec 20, 2021
60731b2
Merge branch 'master' into build-rpatterson-improve-local-devel
rpatterson Dec 21, 2021
067a780
Merge branch 'build-rpatterson-improve-local-devel' into build-versio…
rpatterson Dec 21, 2021
9d9b59a
build(make): Fix line continuation error
rpatterson Dec 21, 2021
26f3280
Merge remote-tracking branch 'origin/master' into build-rpatterson-im…
rpatterson Dec 26, 2021
c2c3044
Merge branch 'build-rpatterson-improve-local-devel' into build-versio…
rpatterson Dec 26, 2021
53cda26
Merge branch 'build-versions-constraints-pins' into fix-flashy-toolba…
rpatterson Dec 26, 2021
11029f7
build(devel): Improve browsing test and tools code
rpatterson Dec 26, 2021
a01f76b
build(data): Add clean data convenience target
rpatterson Dec 26, 2021
109bc55
test(auth): Fix test name typo mismatch
rpatterson Dec 28, 2021
65fd903
feat(auth): Unified log in/out both API/classic
rpatterson Dec 26, 2021
f145c3d
build(checkouts): Avoid merge issues, move to PR
rpatterson Dec 28, 2021
99046d6
Merge branch 'master' into fix-flashy-toolbar-in-2661
rpatterson Feb 16, 2022
8d887af
docs(history): Cleanup no longer relevant changes
rpatterson Feb 25, 2022
49efac5
build(checkouts): Easier development Plone sources
rpatterson Jan 5, 2022
a5ccfd7
docs(feedback): Clarifications from PR feedback
rpatterson Feb 25, 2022
ff43ee3
Merge remote-tracking branch 'origin/master' into fix-flashy-toolbar-…
rpatterson Feb 25, 2022
efdc687
docs(history): Missing changelog entry CI failure
rpatterson Feb 25, 2022
ffc731e
Make docstring verbose, yet accurate, while providing an example and …
stevepiercy Mar 2, 2022
495ab01
Merge remote-tracking branch 'origin/master' into fix-flashy-toolbar-…
rpatterson Mar 4, 2022
1a19b49
Merge branch 'master' into fix-flashy-toolbar-in-2661
avoinea Mar 11, 2022
aa938e3
Merge remote-tracking branch 'origin/master' into fix-flashy-toolbar-…
rpatterson Apr 13, 2022
5086f56
test(clean): Restore clean work tree testing
rpatterson Apr 13, 2022
813ba72
build(make): Unnecessary directory change
rpatterson Feb 23, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions src/helpers/Utils/Utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,24 @@ export const normalizeLanguageName = (language) => {
};

/**
* Given array of objects with `id` property, map to object w/ properties by `id`
* Given an array of objects where each object has a property whose key
* is `id` with a value of `value`, return an array of transformed objects
* where each object's `value` becomes the key of each object.
*
* Example:
* [{id: 'a', title: 'A'}, {id: 'b', title: 'B'}]
* ...transforms to:
* [{'a': {id: 'a', title: 'A'}, 'b': {id: 'b', title: 'B'}}]
*
* This makes lookups more convenient, such as `mapped_actions['a'].title`.
*
* @function arrayWIdsToObject
* @param {Array} An array of objects, each has an `id` property with a string value
* @returns {Object} Object with property for each array object keyed by the `id`
*/
export function arrayWIdsToObject(arrayOfObjs) {
/* The user may be authenticated by different means, including outside the UI. Defer
* to the response from Plone, sepcifically whether Plone presents an option to log
* to the response from Plone, specifically whether Plone presents an option to log
* in. */
return Object.fromEntries(
Object.entries(arrayOfObjs).map((entry) => [
Expand Down