feat: implement permissions and actions management
- Add permissions logic for status options in corrective actions. - Create tests for permissions functionality. - Implement queries for user authentication and actions management. - Develop Actions page to display and manage corrective actions. - Create authentication pages for login, setup, and password reset. - Add IncidentDetail page to view incident details and associated actions. - Implement Settings page for user management and password changes.
This commit is contained in:
1 parent
708da6b9f7
commit
3f6dff5f24
94 files changed
+7213
-643
No files matched your search
+5
-1
@@ -5,12 +5,16 @@ import type { ZodType } from 'zod'
|
||||
import type { SessionUser } from '../auth/sessions.ts'
|
||||
import type { Config } from '../config.ts'
|
||||
import type { Db } from '../db/client.ts'
|
||||
import type { Notifier } from '../notifications.ts'
|
||||
import type { FileStorage } from '../storage.ts'
|
||||
|
||||
export interface AppEnv {
|
||||
Variables: {
|
||||
db: Db
|
||||
config: Config
|
||||
user: SessionUser | null
|
||||
notifier: Notifier
|
||||
storage: FileStorage
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +27,7 @@ export function validate<Target extends keyof ValidationTargets, Schema extends
|
||||
})
|
||||
}
|
||||
|
||||
export const fail = (status: 400 | 401 | 403 | 404 | 409 | 429, message: string) => new HTTPException(status, { message })
|
||||
export const fail = (status: 400 | 401 | 403 | 404 | 409 | 413 | 429, message: string) => new HTTPException(status, { message })
|
||||
|
||||
/** The signed-in user; use after `requireAuth`. */
|
||||
export function currentUser(c: Context<AppEnv>): SessionUser {
|
||||
|
||||
Reference in new issue
Block a user