mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-20 02:05:21 -04:00
fix: add CompleteRequest type to have better type checks for HTTP-Request attribute injection.
Signed-off-by: Yannick Bungers <git@innay.de> Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
0263c09ce1
commit
d369132519
10 changed files with 34 additions and 38 deletions
|
@ -79,7 +79,7 @@ export class PermissionsService {
|
|||
* @return if the user is allowed to create notes
|
||||
*/
|
||||
public mayCreate(user: User | null): boolean {
|
||||
return user !== null || this.noteConfig.guestAccess === GuestAccess.CREATE;
|
||||
return !!user || this.noteConfig.guestAccess === GuestAccess.CREATE;
|
||||
}
|
||||
|
||||
async isOwner(user: User | null, note: Note): Promise<boolean> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue