-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathroutes.ts
More file actions
63 lines (59 loc) · 1.55 KB
/
Copy pathroutes.ts
File metadata and controls
63 lines (59 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/**
* An array of routes that are accessible to the public
* These routes do not require authentication
* @type {string[]}
*/
export const publicRoutes: string[] = [
"/",
"/auth/new-verification",
"/invitation",
"/invitation/accept",
"/invitation/decline",
"/access-denied"
];/* */
/**
* An array of routes that are used for authentication
* These routes will redirect logged in users to /settings
* @type {string[]}
*/
export const authRoutes: string[] = [
"/auth/login",
"/auth/register",
"/auth/error",
"/auth/reset",
"/auth/new-password"
];
/**
* The prefix for API authentication routes
* Routes that start with this prefix are used for API authentication purposes
* @type {string}
*/
export const apiAuthPrefix: string = "/api/auth";
/**
* The default redirect path after logging in
* @type {string}
*/
export const DEFAULT_LOGIN_REDIRECT: string = process.env.DEFAULT_LOGIN_REDIRECT || "/shops";
// Control the access to routes based on user roles
/* export const roleRoutesPermissions = [
{
path: "/projects/[id]/edit",
permissions: [Role.OWNER, Role.ADMIN]
},
{
path: "/dashboard/task-groups/create",
permissions: [Role.OWNER, Role.ADMIN]
},
{
path: "/dashboard/task-groups/[id]/edit",
permissions: [Role.OWNER, Role.ADMIN, Role.EDITOR]
},
{
path: "/dashboard/tasks/create",
permissions: [Role.OWNER, Role.ADMIN]
},
{
path: "/dashboard/members/add",
permissions: [Role.OWNER, Role.ADMIN]
}
] */