mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-13 00:02:37 +10:00
feat: add acl to notifications
not sure if i got all the acls of the different notifications down rn, but it seems to be about right
This commit is contained in:
@ -70,6 +70,8 @@ const systemACLPrefix = "system:";
|
||||
|
||||
export type SystemACL = Array<(typeof systemACLs)[number]>;
|
||||
|
||||
export type ValidACLItems = Array<SystemACL[number] | UserACL[number]>;
|
||||
|
||||
class ACLManager {
|
||||
private getAuthorizationToken(request: MinimumRequestObject) {
|
||||
const [type, token] =
|
||||
|
||||
@ -306,6 +306,7 @@ class LibraryManager {
|
||||
title: `'${game.mName}' ('${versionName}') finished importing.`,
|
||||
description: `Drop finished importing version ${versionName} for ${game.mName}.`,
|
||||
actions: [`View|/admin/library/${gameId}`],
|
||||
requiredPerms: ["import:game:new"],
|
||||
});
|
||||
|
||||
progress(100);
|
||||
|
||||
@ -9,10 +9,12 @@ Design goals:
|
||||
import type { Notification } from "~/prisma/client";
|
||||
import prisma from "../db/database";
|
||||
|
||||
// type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
|
||||
|
||||
// TODO: document notification action format
|
||||
export type NotificationCreateArgs = Pick<
|
||||
Notification,
|
||||
"title" | "description" | "actions" | "nonce"
|
||||
"title" | "description" | "actions" | "nonce" | "requiredPerms"
|
||||
>;
|
||||
|
||||
class NotificationSystem {
|
||||
|
||||
Reference in New Issue
Block a user