mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-16 09:41:13 +10:00
feat: very basic screenshot api
This commit is contained in:
@ -22,6 +22,10 @@ export const userACLDescriptions: ObjectFromList<typeof userACLs> = {
|
||||
"notifications:listen": "Connect to a websocket to recieve notifications.",
|
||||
"notifications:delete": "Delete this account's notifications.",
|
||||
|
||||
"screenshots:new": "Create screenshots for this account",
|
||||
"screenshots:read": "Read all screenshots for this account",
|
||||
"screenshots:delete": "Delete a screenshot for this account",
|
||||
|
||||
"collections:new": "Create collections for this account.",
|
||||
"collections:read": "Fetch all collections (including library).",
|
||||
"collections:delete": "Delete a collection for this account.",
|
||||
|
||||
@ -17,6 +17,10 @@ export const userACLs = [
|
||||
"notifications:listen",
|
||||
"notifications:delete",
|
||||
|
||||
"screenshots:new",
|
||||
"screenshots:read",
|
||||
"screenshots:delete",
|
||||
|
||||
"collections:new",
|
||||
"collections:read",
|
||||
"collections:delete",
|
||||
@ -83,6 +87,12 @@ class ACLManager {
|
||||
return token;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get userId and require one of the specified acls
|
||||
* @param request
|
||||
* @param acls
|
||||
* @returns
|
||||
*/
|
||||
async getUserIdACL(request: MinimumRequestObject | undefined, acls: UserACL) {
|
||||
if (!request)
|
||||
throw new Error("Native web requests not available - weird deployment?");
|
||||
|
||||
Reference in New Issue
Block a user