mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Add acl support
This commit is contained in:
10
src/util/errors/ForbiddenHttpError.ts
Normal file
10
src/util/errors/ForbiddenHttpError.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { HttpError } from './HttpError';
|
||||
|
||||
/**
|
||||
* An error thrown when an agent is not allowed to access data.
|
||||
*/
|
||||
export class ForbiddenHttpError extends HttpError {
|
||||
public constructor(message?: string) {
|
||||
super(403, 'ForbiddenHttpError', message);
|
||||
}
|
||||
}
|
||||
10
src/util/errors/UnauthorizedHttpError.ts
Normal file
10
src/util/errors/UnauthorizedHttpError.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { HttpError } from './HttpError';
|
||||
|
||||
/**
|
||||
* An error thrown when an agent is not authorized.
|
||||
*/
|
||||
export class UnauthorizedHttpError extends HttpError {
|
||||
public constructor(message?: string) {
|
||||
super(401, 'UnauthorizedHttpError', message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user