mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-18 17:25:16 -04:00
Update Note entity
We now use the new permissions split in users and groups. Also the note now knows the colors of its authors. Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
ba9d7a6572
commit
ef92ab73f9
4 changed files with 47 additions and 71 deletions
|
@ -1,12 +1,17 @@
|
|||
import { Column, ManyToOne } from 'typeorm/index';
|
||||
import { Column, Entity, ManyToOne } from 'typeorm/index';
|
||||
import { Group } from '../groups/group.entity';
|
||||
import { Note } from '../notes/note.entity';
|
||||
|
||||
@Entity()
|
||||
export class NoteGroupPermission {
|
||||
@ManyToOne(_ => Group)
|
||||
@ManyToOne(_ => Group, { primary: true })
|
||||
group: Group;
|
||||
|
||||
@ManyToOne(_ => Note)
|
||||
@ManyToOne(
|
||||
_ => Note,
|
||||
note => note.groupPermissions,
|
||||
{ primary: true },
|
||||
)
|
||||
note: Note;
|
||||
|
||||
@Column()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue