From dae4714c83b436a461a4bdeb7ab93a4fc24064d6 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Tue, 7 May 2019 16:25:01 +0200 Subject: Move OC constants to the bundle Signed-off-by: Christoph Wurst --- core/src/OC/constants.js | 29 +++++++++++++++++++++++++++++ core/src/OC/index.js | 22 ++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 core/src/OC/constants.js (limited to 'core/src') diff --git a/core/src/OC/constants.js b/core/src/OC/constants.js new file mode 100644 index 00000000000..25482ecb832 --- /dev/null +++ b/core/src/OC/constants.js @@ -0,0 +1,29 @@ +/* + * @copyright 2019 Christoph Wurst + * + * @author 2019 Christoph Wurst + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software = you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation either version 3 of the + * License or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not see . + */ + +export const PERMISSION_NONE = 0 +export const PERMISSION_CREATE = 4 +export const PERMISSION_READ = 1 +export const PERMISSION_UPDATE = 2 +export const PERMISSION_DELETE = 8 +export const PERMISSION_SHARE = 16 +export const PERMISSION_ALL = 31 +export const TAG_FAVORITE = '_$!!$_' diff --git a/core/src/OC/index.js b/core/src/OC/index.js index 345abdf5796..471d7a182f1 100644 --- a/core/src/OC/index.js +++ b/core/src/OC/index.js @@ -24,6 +24,16 @@ import {AppConfig, appConfig} from './appconfig' import appswebroots from './appswebroots' import Backbone from './backbone' import Config from './config' +import { + PERMISSION_ALL, + PERMISSION_CREATE, + PERMISSION_DELETE, + PERMISSION_NONE, + PERMISSION_READ, + PERMISSION_SHARE, + PERMISSION_UPDATE, + TAG_FAVORITE, +} from './constants' import ContactsMenu from './contactsmenu' import Dialogs from './dialogs' import EventSource from './eventsource' @@ -51,6 +61,18 @@ import webroot from './webroot' /** @namespace OC */ export default { + /* + * Constants + */ + PERMISSION_ALL, + PERMISSION_CREATE, + PERMISSION_DELETE, + PERMISSION_NONE, + PERMISSION_READ, + PERMISSION_SHARE, + PERMISSION_UPDATE, + TAG_FAVORITE, + Apps, AppConfig, appConfig, -- cgit v1.2.3