summaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
Diffstat (limited to 'core/src')
-rw-r--r--core/src/OC/constants.js29
-rw-r--r--core/src/OC/index.js22
2 files changed, 51 insertions, 0 deletions
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 <christoph@winzerhof-wurst.at>
+ *
+ * @author 2019 Christoph Wurst <christoph@winzerhof-wurst.at>
+ *
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+
+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 = '_$!<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,