mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-10 17:53:36 +02:00
fix: segment project fetch when global (#5313)
Co-authored-by: Nuno Góis <github@nunogois.com>
This commit is contained in:
parent
3b23719c7f
commit
fb85ae20d9
@ -3,7 +3,6 @@ import {
|
||||
DELETE_FEATURE,
|
||||
ADMIN,
|
||||
UPDATE_FEATURE,
|
||||
DELETE_SEGMENT,
|
||||
UPDATE_PROJECT_SEGMENT,
|
||||
} from '../types/permissions';
|
||||
import { IUnleashConfig } from '../types/option';
|
||||
@ -96,7 +95,8 @@ const rbacMiddleware = (
|
||||
// This is needed to check if the user has the right permissions on a project level
|
||||
if (
|
||||
!projectId &&
|
||||
permissionsArray.includes(UPDATE_PROJECT_SEGMENT)
|
||||
permissionsArray.includes(UPDATE_PROJECT_SEGMENT) &&
|
||||
params.id
|
||||
) {
|
||||
const { id } = params;
|
||||
const { project } = await segmentStore.get(id);
|
||||
|
Loading…
Reference in New Issue
Block a user