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

feat/AB#74292 People picker #725

Open
wants to merge 35 commits into
base: 2.x.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
a164834
mock data
TaiKamilla Sep 4, 2023
8c5d92a
Merge branch '2.1.x' into feat/AB#74292_ABC-Create-people-picker-ques…
NathanHGit Sep 6, 2023
d486e03
Merge branch 'beta' into feat/AB#74292_ABC-Create-people-picker-question
MwanPygmay Sep 26, 2023
3647e3a
type not supported anymore, changed
MwanPygmay Sep 26, 2023
d93b78b
add support for people question: get type and metadata correctly, ali…
MwanPygmay Sep 27, 2023
54937ce
Merge branch 'beta' into feat/AB#74292_ABC-Create-people-picker-question
TaiKamilla Oct 3, 2023
a84fecf
Merge remote-tracking branch 'origin/beta' into feat/AB#74292_ABC-Cre…
TaiKamilla Oct 4, 2023
189c5a1
type
TaiKamilla Oct 5, 2023
2115ffb
missing resolver change
TaiKamilla Oct 5, 2023
3c3e00c
it works
TaiKamilla Oct 6, 2023
52ae447
compact the code a bit
TaiKamilla Oct 6, 2023
6602426
Clean 🧼 🧽
TaiKamilla Oct 9, 2023
21522f0
Merge branch '2.x.x' into feat/AB#74292_ABC-Create-people-picker-ques…
NathanHGit Mar 20, 2024
ae83129
feat: added people type
NathanHGit Mar 20, 2024
d5f2cea
feat: add get people
NathanHGit Mar 22, 2024
17c52d8
feat: handle people filtering and add people resolver
NathanHGit Mar 25, 2024
2c5088c
review people filter format + unique ids
NathanHGit Mar 25, 2024
05c65cd
add context to resolvers
NathanHGit Mar 26, 2024
8e5b164
fix people resolver
NathanHGit Mar 27, 2024
e3c999a
delete field.resource
NathanHGit Mar 27, 2024
0ea3ab0
fix empty value
NathanHGit Mar 27, 2024
716011b
Merge branch '2.x.x' into feat/AB#74292_ABC-Create-people-picker-ques…
AntoineRelief Apr 24, 2024
fe3d1fc
now getting people ten by ten
MwanPygmay Apr 30, 2024
f5d146e
update meta, and correct export
MwanPygmay May 3, 2024
d4ea0f5
add support for summary cards and text editor
MwanPygmay May 3, 2024
089a94d
avoid getting a back-to-back query
MwanPygmay May 21, 2024
acc3dee
Merge branch '2.x.x' into feat/AB#74292_ABC-Create-people-picker-ques…
AntoineRelief Jun 3, 2024
09be020
update config
AntoineRelief Jun 4, 2024
8f6eed0
Merge branch '2.x.x' into feat/AB#74292_ABC-Create-people-picker-ques…
AntoineRelief Jun 14, 2024
df67577
optimize people query
AntoineRelief Jun 14, 2024
0c7dc32
add support for graphs
MwanPygmay Jun 18, 2024
6906094
remove console log
MwanPygmay Jun 19, 2024
dcf1c7a
Merge branch '2.x.x' into feat/AB#74292_ABC-Create-people-picker-ques…
AntoineRelief Jun 26, 2024
7893c10
add support for filter, record history. Sorting does not work yet
MwanPygmay Jun 27, 2024
2031d43
add sorting for layouts
MwanPygmay Jun 28, 2024
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
2 changes: 2 additions & 0 deletions config/custom-environment-variables.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,7 @@ module.exports = {
clientId: 'COMMON_SERVICES_CLIENT_ID',
clientSecret: 'COMMON_SERVICES_CLIENT_SECRET',
scope: 'COMMON_SERVICES_SCOPE',
authUrl: 'COMMON_SERVICES_AUTH_URL',
url: 'COMMON_SERVICES_URL',
},
};
27 changes: 27 additions & 0 deletions src/routes/proxy/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@
res.status(200).send(JSON.parse(cacheData));
} else {
const token = await getToken(api, req.headers.accesstoken, ping);
await axios({
url,
method: req.method,
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
maxRedirects: 35,
...(!isEmpty(req.body) && {
data: JSON.stringify(req.body),
}),
})

Check failure

Code scanning / CodeQL

Server-side request forgery Critical

The
URL
of this request depends on a
user-provided value
.
The
URL
of this request depends on a
user-provided value
.
.then(async ({ data, status }) => {
// We are only caching the results of requests that are not user-dependent.
// Otherwise, unwanted users could access cached data of other users.
Expand Down Expand Up @@ -171,6 +171,33 @@
}
});

router.all('/common-services/**', async (req, res) => {
const commonServiceConfig = {
name: 'common-services',
status: 'active',
authType: 'service-to-service',
endpoint: config.get<string>('commonServices.url'),
settings: CryptoJS.AES.encrypt(
JSON.stringify({
authTargetUrl: config.get<string>('commonServices.authUrl'),
apiClientID: config.get<string>('commonServices.clientId'),
scope: config.get<string>('commonServices.scope'),
safeSecret: config.get<string>('commonServices.clientSecret'),
}),
config.get('encryption.key')
).toString(),
};

try {
const api = new ApiConfiguration(commonServiceConfig);
const path = req.originalUrl.split('common-services').pop().substring(1);
await proxyAPIRequest(req, res, api, path);
} catch (err) {
logger.error(err.message, { stack: err.stack });
return res.status(500).send(req.t('common.errors.internalServerError'));
}
});

/**
* Forward requests to actual API using the API Configuration
*/
Expand Down
Loading