Variables: added __user.email to global variable (#28853)

* added email to global variable.

* forgot to increase the count.
This commit is contained in:
Marcus Andersson
2020-11-05 15:26:08 +01:00
committed by GitHub
parent deb8889331
commit dbaf213f8a
6 changed files with 7 additions and 2 deletions

View File

@@ -16,6 +16,7 @@ export class User {
helpFlags1: number;
lightTheme: boolean;
hasEditPermissionInFolders: boolean;
email?: string;
constructor() {
if (config.bootData.user) {

View File

@@ -161,6 +161,7 @@ export const addSystemTemplateVariables = (dashboard: DashboardModel): ThunkResu
value: {
login: contextSrv.user.login,
id: contextSrv.user.id,
email: contextSrv.user.email,
toString: () => contextSrv.user.id.toString(),
},
},

View File

@@ -110,6 +110,7 @@ export interface OrgVariableModel extends SystemVariable<OrgProps> {}
export interface UserProps {
login: string;
id: number;
email?: string;
toString: () => string;
}