1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-19 00:15:43 +01:00

fix: export default project constant

This commit is contained in:
Fredrik Oseberg 2022-01-10 16:28:13 +01:00 committed by Ivar Conradi Østhus
parent f39f1eaa7c
commit a723004edd
No known key found for this signature in database
GPG Key ID: 31AC596886B0BD09
2 changed files with 3 additions and 2 deletions

View File

@ -14,6 +14,7 @@ import {
ENVIRONMENT_PERMISSION_TYPE,
ROOT_PERMISSION_TYPE,
} from '../util/constants';
import { DEFAULT_PROJECT } from 'lib/services/project-service';
const T = {
ROLE_USER: 'role_user',
@ -130,7 +131,7 @@ export class AccessStore implements IAccessStore {
// we map the project to the project and environment specific
// permissions that are connected to the editor role.
if (row.role_id === EDITOR_ID && row.type !== ROOT_PERMISSION_TYPE) {
project = 'default';
project = DEFAULT_PROJECT;
} else if (row.type !== ROOT_PERMISSION_TYPE) {
project = row.project ? row.project : undefined;
}

View File

@ -34,7 +34,7 @@ import IncompatibleProjectError from '../error/incompatible-project-error';
const getCreatedBy = (user: User) => user.email || user.username;
const DEFAULT_PROJECT = 'default';
export const DEFAULT_PROJECT = 'default';
export interface UsersWithRoles {
users: IUserWithRole[];