mirror of
https://github.com/plankanban/planka.git
synced 2025-12-26 01:11:58 +03:00
15 lines
533 B
JavaScript
15 lines
533 B
JavaScript
/*!
|
|
* Copyright (c) 2024 PLANKA Software GmbH
|
|
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
|
*/
|
|
|
|
import { ListTypes, UserRoles } from '../constants/Enums';
|
|
|
|
export const isUserAdminOrProjectOwner = (user) =>
|
|
[UserRoles.ADMIN, UserRoles.PROJECT_OWNER].includes(user.role);
|
|
|
|
export const isListArchiveOrTrash = (list) =>
|
|
[ListTypes.ARCHIVE, ListTypes.TRASH].includes(list.type);
|
|
|
|
export const isListFinite = (list) => [ListTypes.ACTIVE, ListTypes.CLOSED].includes(list.type);
|