Skip to content

Commit

Permalink
fix: rbac should pick up projectId from path if available
Browse files Browse the repository at this point in the history
  • Loading branch information
ivarconr committed Feb 1, 2022
1 parent 2be0770 commit e5035f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/middleware/rbac-middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit e5035f9

Please sign in to comment.