debian-mirror-gitlab/app/assets/javascripts/pages/projects/shared/permissions/constants.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.5 KiB
JavaScript
Raw Normal View History

2021-04-17 20:07:23 +05:30
import { s__, __ } from '~/locale';
2022-10-11 01:57:18 +05:30
import {
VISIBILITY_LEVEL_PRIVATE_INTEGER,
VISIBILITY_LEVEL_INTERNAL_INTEGER,
VISIBILITY_LEVEL_PUBLIC_INTEGER,
} from '~/visibility_level/constants';
2018-03-17 18:26:18 +05:30
export const visibilityLevelDescriptions = {
2022-10-11 01:57:18 +05:30
[VISIBILITY_LEVEL_PRIVATE_INTEGER]: __(
2022-08-13 15:12:31 +05:30
`Only accessible by %{membersPageLinkStart}project members%{membersPageLinkEnd}. Membership must be explicitly granted to each user.`,
2019-07-31 22:56:46 +05:30
),
2022-10-11 01:57:18 +05:30
[VISIBILITY_LEVEL_INTERNAL_INTEGER]: __('Accessible by any user who is logged in.'),
[VISIBILITY_LEVEL_PUBLIC_INTEGER]: __('Accessible by anyone, regardless of authentication.'),
2018-03-17 18:26:18 +05:30
};
2019-09-30 21:07:59 +05:30
2019-12-04 20:38:33 +05:30
export const featureAccessLevel = {
2019-09-30 21:07:59 +05:30
NOT_ENABLED: 0,
PROJECT_MEMBERS: 10,
EVERYONE: 20,
};
2021-10-27 15:23:28 +05:30
export const featureAccessLevelDescriptions = {
2019-09-30 21:07:59 +05:30
[featureAccessLevel.NOT_ENABLED]: __('Enable feature to choose access level'),
[featureAccessLevel.PROJECT_MEMBERS]: __('Only Project Members'),
[featureAccessLevel.EVERYONE]: __('Everyone With Access'),
};
export const featureAccessLevelNone = [
featureAccessLevel.NOT_ENABLED,
featureAccessLevelDescriptions[featureAccessLevel.NOT_ENABLED],
];
export const featureAccessLevelMembers = [
featureAccessLevel.PROJECT_MEMBERS,
featureAccessLevelDescriptions[featureAccessLevel.PROJECT_MEMBERS],
];
export const featureAccessLevelEveryone = [
featureAccessLevel.EVERYONE,
featureAccessLevelDescriptions[featureAccessLevel.EVERYONE],
];
2021-04-17 20:07:23 +05:30
export const CVE_ID_REQUEST_BUTTON_I18N = {
cve_request_toggle_label: s__('CVE|Enable CVE ID requests in the issue sidebar'),
};