Allow restricting announcement to a set of roles. Fix MkRoleSelectDialog only respecting publicOnly half the time
Closes #682
This commit is contained in:
parent
5dd32123a3
commit
f3b5c3f447
12 changed files with 96 additions and 1 deletions
|
|
@ -6,6 +6,7 @@
|
|||
import { Entity, Index, Column, PrimaryColumn, ManyToOne, JoinColumn } from 'typeorm';
|
||||
import { id } from './util/id.js';
|
||||
import { MiUser } from './User.js';
|
||||
import { MiRole } from './Role.js';
|
||||
|
||||
@Entity('announcement')
|
||||
export class MiAnnouncement {
|
||||
|
|
@ -66,6 +67,12 @@ export class MiAnnouncement {
|
|||
})
|
||||
public forExistingUsers: boolean;
|
||||
|
||||
@Column('text', {
|
||||
array: true,
|
||||
default: null, nullable: true,
|
||||
})
|
||||
public forRoles: MiRole['id'][] | null;
|
||||
|
||||
@Index()
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue