diff options
Diffstat (limited to 'core/src/OC/admin.js')
-rw-r--r-- | core/src/OC/admin.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/src/OC/admin.js b/core/src/OC/admin.js new file mode 100644 index 00000000000..d29e4cf676b --- /dev/null +++ b/core/src/OC/admin.js @@ -0,0 +1,14 @@ +/** + * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +const isAdmin = !!window._oc_isadmin + +/** + * Returns whether the current user is an administrator + * + * @return {boolean} true if the user is an admin, false otherwise + * @since 9.0.0 + */ +export const isUserAdmin = () => isAdmin |