mirror of
https://github.com/Unleash/unleash.git
synced 2025-07-02 01:17:58 +02:00
fix: export default project constant
This commit is contained in:
parent
f39f1eaa7c
commit
a723004edd
@ -14,6 +14,7 @@ import {
|
|||||||
ENVIRONMENT_PERMISSION_TYPE,
|
ENVIRONMENT_PERMISSION_TYPE,
|
||||||
ROOT_PERMISSION_TYPE,
|
ROOT_PERMISSION_TYPE,
|
||||||
} from '../util/constants';
|
} from '../util/constants';
|
||||||
|
import { DEFAULT_PROJECT } from 'lib/services/project-service';
|
||||||
|
|
||||||
const T = {
|
const T = {
|
||||||
ROLE_USER: 'role_user',
|
ROLE_USER: 'role_user',
|
||||||
@ -130,7 +131,7 @@ export class AccessStore implements IAccessStore {
|
|||||||
// we map the project to the project and environment specific
|
// we map the project to the project and environment specific
|
||||||
// permissions that are connected to the editor role.
|
// permissions that are connected to the editor role.
|
||||||
if (row.role_id === EDITOR_ID && row.type !== ROOT_PERMISSION_TYPE) {
|
if (row.role_id === EDITOR_ID && row.type !== ROOT_PERMISSION_TYPE) {
|
||||||
project = 'default';
|
project = DEFAULT_PROJECT;
|
||||||
} else if (row.type !== ROOT_PERMISSION_TYPE) {
|
} else if (row.type !== ROOT_PERMISSION_TYPE) {
|
||||||
project = row.project ? row.project : undefined;
|
project = row.project ? row.project : undefined;
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ import IncompatibleProjectError from '../error/incompatible-project-error';
|
|||||||
|
|
||||||
const getCreatedBy = (user: User) => user.email || user.username;
|
const getCreatedBy = (user: User) => user.email || user.username;
|
||||||
|
|
||||||
const DEFAULT_PROJECT = 'default';
|
export const DEFAULT_PROJECT = 'default';
|
||||||
|
|
||||||
export interface UsersWithRoles {
|
export interface UsersWithRoles {
|
||||||
users: IUserWithRole[];
|
users: IUserWithRole[];
|
||||||
|
Loading…
Reference in New Issue
Block a user