mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-23 07:42:10 +00:00
fix user email
This commit is contained in:
parent
6a64b8658a
commit
84cc4a35d4
@ -423,17 +423,19 @@ const Icon: FunctionComponent<ComponentProps> = ({
|
||||
);
|
||||
} else if (icon === IconProp.BarsArrowDown) {
|
||||
return getSvgWrapper(
|
||||
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" />
|
||||
|
||||
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25"
|
||||
/>
|
||||
);
|
||||
} else if (icon === IconProp.BarsArrowUp) {
|
||||
return getSvgWrapper(
|
||||
|
||||
|
||||
<path strokeLinecap="round" strokeLinejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" />
|
||||
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25"
|
||||
/>
|
||||
);
|
||||
} else if (icon === IconProp.CheckCircle) {
|
||||
return getSvgWrapper(
|
||||
|
@ -34,24 +34,22 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Escalation Rules',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.ON_CALL_DUTY_POLICY_VIEW_ESCALATION
|
||||
PageMap.ON_CALL_DUTY_POLICY_VIEW_ESCALATION
|
||||
] as Route,
|
||||
{ modelId: props.modelId }
|
||||
),
|
||||
}}
|
||||
icon={IconProp.BarsArrowDown}
|
||||
/>
|
||||
|
||||
|
||||
</SideMenuSection>
|
||||
|
||||
<SideMenuSection title="Advanced">
|
||||
<SideMenuItem
|
||||
<SideMenuItem
|
||||
link={{
|
||||
title: 'Execution Logs',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.ON_CALL_DUTY_POLICY_VIEW_EXECUTION_LOGS
|
||||
PageMap.ON_CALL_DUTY_POLICY_VIEW_EXECUTION_LOGS
|
||||
] as Route,
|
||||
{ modelId: props.modelId }
|
||||
),
|
||||
@ -63,7 +61,7 @@ const DashboardSideMenu: FunctionComponent<ComponentProps> = (
|
||||
title: 'Delete Policy',
|
||||
to: RouteUtil.populateRouteParams(
|
||||
RouteMap[
|
||||
PageMap.ON_CALL_DUTY_POLICY_VIEW_DELETE
|
||||
PageMap.ON_CALL_DUTY_POLICY_VIEW_DELETE
|
||||
] as Route,
|
||||
{ modelId: props.modelId }
|
||||
),
|
||||
|
@ -21,9 +21,7 @@ import Project from './Project';
|
||||
@AllowAccessIfSubscriptionIsUnpaid()
|
||||
@TableAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
delete: [Permission.CurrentUser],
|
||||
update: [Permission.CurrentUser],
|
||||
})
|
||||
@ -39,13 +37,10 @@ import Project from './Project';
|
||||
tableDescription: 'Phone Number which will be used for call notifications.',
|
||||
})
|
||||
@CurrentUserCanAccessRecordBy('userId')
|
||||
class UserCall extends BaseModel {
|
||||
|
||||
class UserCall extends BaseModel {
|
||||
@ColumnAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -72,9 +67,7 @@ class UserCall extends BaseModel {
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@Index()
|
||||
@ -95,9 +88,7 @@ class UserCall extends BaseModel {
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -116,15 +107,9 @@ class UserCall extends BaseModel {
|
||||
})
|
||||
public phone?: Phone = undefined;
|
||||
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -132,8 +117,7 @@ class UserCall extends BaseModel {
|
||||
type: TableColumnType.Entity,
|
||||
modelType: User,
|
||||
title: 'User',
|
||||
description:
|
||||
'Relation to User who this email belongs to',
|
||||
description: 'Relation to User who this email belongs to',
|
||||
})
|
||||
@ManyToOne(
|
||||
(_type: string) => {
|
||||
@ -150,19 +134,14 @@ class UserCall extends BaseModel {
|
||||
public user?: User = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
type: TableColumnType.ObjectID,
|
||||
title: 'User ID',
|
||||
description:
|
||||
'User ID who this email belongs to',
|
||||
description: 'User ID who this email belongs to',
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.ObjectID,
|
||||
@ -172,14 +151,9 @@ class UserCall extends BaseModel {
|
||||
@Index()
|
||||
public userId?: ObjectID = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -205,12 +179,8 @@ class UserCall extends BaseModel {
|
||||
public createdByUser?: User = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -271,36 +241,40 @@ class UserCall extends BaseModel {
|
||||
})
|
||||
public deletedByUserId?: ObjectID = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({ title: 'Is Verified',
|
||||
description:
|
||||
'Is this verified?',isDefaultValueColumn: true, type: TableColumnType.Boolean })
|
||||
@TableColumn({
|
||||
title: 'Is Verified',
|
||||
description: 'Is this verified?',
|
||||
isDefaultValueColumn: true,
|
||||
type: TableColumnType.Boolean,
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.Boolean,
|
||||
default: false,
|
||||
})
|
||||
public isVerified?: boolean = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({ title: 'Verification Code',
|
||||
description:
|
||||
'Temporary Verification Code',isDefaultValueColumn: false, type: TableColumnType.ShortText })
|
||||
@TableColumn({
|
||||
title: 'Verification Code',
|
||||
description: 'Temporary Verification Code',
|
||||
isDefaultValueColumn: false,
|
||||
type: TableColumnType.ShortText,
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.ShortText,
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
length: ColumnLength.ShortText,
|
||||
})
|
||||
public verificationCode?: boolean = undefined;
|
||||
}
|
||||
|
||||
export default UserCall;
|
||||
export default UserCall;
|
||||
|
@ -21,9 +21,7 @@ import Project from './Project';
|
||||
@AllowAccessIfSubscriptionIsUnpaid()
|
||||
@TableAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
delete: [Permission.CurrentUser],
|
||||
update: [Permission.CurrentUser],
|
||||
})
|
||||
@ -39,13 +37,10 @@ import Project from './Project';
|
||||
tableDescription: 'Emails which will be used for notifications.',
|
||||
})
|
||||
@CurrentUserCanAccessRecordBy('userId')
|
||||
class UserEmail extends BaseModel {
|
||||
|
||||
class UserEmail extends BaseModel {
|
||||
@ColumnAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -72,9 +67,7 @@ class UserEmail extends BaseModel {
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@Index()
|
||||
@ -93,12 +86,9 @@ class UserEmail extends BaseModel {
|
||||
})
|
||||
public projectId?: ObjectID = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -117,15 +107,9 @@ class UserEmail extends BaseModel {
|
||||
})
|
||||
public email?: Email = undefined;
|
||||
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -133,8 +117,7 @@ class UserEmail extends BaseModel {
|
||||
type: TableColumnType.Entity,
|
||||
modelType: User,
|
||||
title: 'User',
|
||||
description:
|
||||
'Relation to User who this email belongs to',
|
||||
description: 'Relation to User who this email belongs to',
|
||||
})
|
||||
@ManyToOne(
|
||||
(_type: string) => {
|
||||
@ -151,19 +134,14 @@ class UserEmail extends BaseModel {
|
||||
public user?: User = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
type: TableColumnType.ObjectID,
|
||||
title: 'User ID',
|
||||
description:
|
||||
'User ID who this email belongs to',
|
||||
description: 'User ID who this email belongs to',
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.ObjectID,
|
||||
@ -173,14 +151,9 @@ class UserEmail extends BaseModel {
|
||||
@Index()
|
||||
public userId?: ObjectID = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -206,12 +179,8 @@ class UserEmail extends BaseModel {
|
||||
public createdByUser?: User = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -272,39 +241,40 @@ class UserEmail extends BaseModel {
|
||||
})
|
||||
public deletedByUserId?: ObjectID = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({ title: 'Is Verified',
|
||||
description:
|
||||
'Is this verified?',isDefaultValueColumn: true, type: TableColumnType.Boolean })
|
||||
@TableColumn({
|
||||
title: 'Is Verified',
|
||||
description: 'Is this verified?',
|
||||
isDefaultValueColumn: true,
|
||||
type: TableColumnType.Boolean,
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.Boolean,
|
||||
default: false,
|
||||
})
|
||||
public isVerified?: boolean = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({ title: 'Verification Code',
|
||||
description:
|
||||
'Temporary Verification Code',isDefaultValueColumn: false, type: TableColumnType.ShortText })
|
||||
@TableColumn({
|
||||
title: 'Verification Code',
|
||||
description: 'Temporary Verification Code',
|
||||
isDefaultValueColumn: false,
|
||||
type: TableColumnType.ShortText,
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.ShortText,
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
length: ColumnLength.ShortText,
|
||||
})
|
||||
public verificationCode?: boolean = undefined;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
export default UserEmail;
|
||||
export default UserEmail;
|
||||
|
@ -21,9 +21,7 @@ import Project from './Project';
|
||||
@AllowAccessIfSubscriptionIsUnpaid()
|
||||
@TableAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
delete: [Permission.CurrentUser],
|
||||
update: [Permission.CurrentUser],
|
||||
})
|
||||
@ -39,14 +37,10 @@ import Project from './Project';
|
||||
tableDescription: 'Phone Number which will be used for SMS notifications.',
|
||||
})
|
||||
@CurrentUserCanAccessRecordBy('userId')
|
||||
class UserSMS extends BaseModel {
|
||||
|
||||
|
||||
class UserSMS extends BaseModel {
|
||||
@ColumnAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -73,9 +67,7 @@ class UserSMS extends BaseModel {
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@Index()
|
||||
@ -96,9 +88,7 @@ class UserSMS extends BaseModel {
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [Permission.CurrentUser],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -117,15 +107,9 @@ class UserSMS extends BaseModel {
|
||||
})
|
||||
public phone?: Phone = undefined;
|
||||
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -133,8 +117,7 @@ class UserSMS extends BaseModel {
|
||||
type: TableColumnType.Entity,
|
||||
modelType: User,
|
||||
title: 'User',
|
||||
description:
|
||||
'Relation to User who this email belongs to',
|
||||
description: 'Relation to User who this email belongs to',
|
||||
})
|
||||
@ManyToOne(
|
||||
(_type: string) => {
|
||||
@ -151,19 +134,14 @@ class UserSMS extends BaseModel {
|
||||
public user?: User = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
type: TableColumnType.ObjectID,
|
||||
title: 'User ID',
|
||||
description:
|
||||
'User ID who this email belongs to',
|
||||
description: 'User ID who this email belongs to',
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.ObjectID,
|
||||
@ -173,14 +151,9 @@ class UserSMS extends BaseModel {
|
||||
@Index()
|
||||
public userId?: ObjectID = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -206,12 +179,8 @@ class UserSMS extends BaseModel {
|
||||
public createdByUser?: User = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
read: [
|
||||
Permission.CurrentUser
|
||||
],
|
||||
create: [Permission.CurrentUser],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
@ -272,36 +241,40 @@ class UserSMS extends BaseModel {
|
||||
})
|
||||
public deletedByUserId?: ObjectID = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [Permission.CurrentUser],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({ title: 'Is Verified',
|
||||
description:
|
||||
'Is this verified?',isDefaultValueColumn: true, type: TableColumnType.Boolean })
|
||||
@TableColumn({
|
||||
title: 'Is Verified',
|
||||
description: 'Is this verified?',
|
||||
isDefaultValueColumn: true,
|
||||
type: TableColumnType.Boolean,
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.Boolean,
|
||||
default: false,
|
||||
})
|
||||
public isVerified?: boolean = undefined;
|
||||
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({ title: 'Verification Code',
|
||||
description:
|
||||
'Temporary Verification Code',isDefaultValueColumn: false, type: TableColumnType.ShortText })
|
||||
@TableColumn({
|
||||
title: 'Verification Code',
|
||||
description: 'Temporary Verification Code',
|
||||
isDefaultValueColumn: false,
|
||||
type: TableColumnType.ShortText,
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.ShortText,
|
||||
nullable: false,
|
||||
nullable: true,
|
||||
length: ColumnLength.ShortText,
|
||||
})
|
||||
public verificationCode?: boolean = undefined;
|
||||
}
|
||||
|
||||
export default UserSMS;
|
||||
export default UserSMS;
|
||||
|
Loading…
Reference in New Issue
Block a user