@nextcloud/auth
Version:
Nextcloud helpers related to authentication and the current user
19 lines (18 loc) • 455 B
TypeScript
/**
* SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
declare global {
interface Window {
_oc_isadmin?: boolean;
}
}
export interface NextcloudUser {
uid: string;
displayName: string | null;
isAdmin: boolean;
}
/**
* Get the currently logged in Nextcloud user or null if not logged in
*/
export declare function getCurrentUser(): NextcloudUser | null;