1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-03-23 00:16:25 +01:00

fix: rbac should pick up projectId from path if available

This commit is contained in:
Ivar Conradi Østhus 2022-02-01 22:58:52 +01:00
parent 2be077007d
commit e5035f96e1
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09

View File

@ -53,7 +53,7 @@ const rbacMiddleware = (
const { featureName } = params;
projectId = await featureToggleStore.getProjectId(featureName);
} else if (permission === CREATE_FEATURE) {
projectId = req.body.project || 'default';
projectId = projectId || req.body.project || 'default';
}
return accessService.hasPermission(