debian-mirror-gitlab/app/assets/javascripts/visibility_level/constants.js

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

21 lines
914 B
JavaScript
Raw Normal View History

2022-10-11 01:57:18 +05:30
export const VISIBILITY_LEVEL_PRIVATE_STRING = 'private';
export const VISIBILITY_LEVEL_INTERNAL_STRING = 'internal';
export const VISIBILITY_LEVEL_PUBLIC_STRING = 'public';
export const VISIBILITY_LEVEL_PRIVATE_INTEGER = 0;
export const VISIBILITY_LEVEL_INTERNAL_INTEGER = 10;
export const VISIBILITY_LEVEL_PUBLIC_INTEGER = 20;
2022-08-27 11:52:29 +05:30
// Matches `lib/gitlab/visibility_level.rb`
2022-10-11 01:57:18 +05:30
export const VISIBILITY_LEVELS_STRING_TO_INTEGER = {
[VISIBILITY_LEVEL_PRIVATE_STRING]: VISIBILITY_LEVEL_PRIVATE_INTEGER,
[VISIBILITY_LEVEL_INTERNAL_STRING]: VISIBILITY_LEVEL_INTERNAL_INTEGER,
[VISIBILITY_LEVEL_PUBLIC_STRING]: VISIBILITY_LEVEL_PUBLIC_INTEGER,
};
export const VISIBILITY_LEVELS_INTEGER_TO_STRING = {
[VISIBILITY_LEVEL_PRIVATE_INTEGER]: VISIBILITY_LEVEL_PRIVATE_STRING,
[VISIBILITY_LEVEL_INTERNAL_INTEGER]: VISIBILITY_LEVEL_INTERNAL_STRING,
[VISIBILITY_LEVEL_PUBLIC_INTEGER]: VISIBILITY_LEVEL_PUBLIC_STRING,
2022-08-27 11:52:29 +05:30
};