Skip to content
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions backend/src/core/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ async def __call__(self, request: Request):
def mock_authenticate(role: AccountRole) -> Account | None:
"""Mock authentication function. Replace with real authentication logic."""
role_to_id = {
AccountRole.STUDENT: 1,
AccountRole.ADMIN: 2,
AccountRole.STAFF: 3,
AccountRole.ADMIN: 1,
AccountRole.STAFF: 2,
AccountRole.STUDENT: 3,
}
role_to_pid = {
AccountRole.STUDENT: "111111111",
Expand Down
16 changes: 8 additions & 8 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@radix-ui/react-separator": "^1.1.7",
"@radix-ui/react-slot": "^1.2.3",
"@radix-ui/react-tabs": "^1.1.13",
"@tanstack/react-query": "^5.90.7",
"@tanstack/react-query": "^5.90.10",
"@tanstack/react-table": "^8.21.3",
"axios": "^1.12.2",
"class-variance-authority": "^0.7.1",
Expand Down
112 changes: 0 additions & 112 deletions frontend/src/app/CreateEditDemo/page.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions frontend/src/app/TableDemo/page.tsx

This file was deleted.

17 changes: 0 additions & 17 deletions frontend/src/app/TableImplementationDemos/page.tsx

This file was deleted.

15 changes: 12 additions & 3 deletions frontend/src/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,19 @@ const authOptions: NextAuthOptions = {
// Replace this with the actual authentication logic once we know how ONYEN SSO works
if (username === "admin" && password === "password") {
return {
id: "1",
id: "2",
name: "Admin User",
email: "[email protected]",
accessToken: "fake-access-token-for-dev",
accessToken: "admin",
refreshToken: "fake-refresh-token-for-dev",
};
}
if (username === "student" && password === "password") {
return {
id: "1",
name: "Student User",
email: "[email protected]",
accessToken: "student",
refreshToken: "fake-refresh-token-for-dev",
};
}
Expand Down Expand Up @@ -96,4 +105,4 @@ const authOptions: NextAuthOptions = {

const handler = NextAuth(authOptions);

export { handler as GET, handler as POST, authOptions };
export { authOptions, handler as GET, handler as POST };
21 changes: 0 additions & 21 deletions frontend/src/app/auth-test/api/tokens/route.ts

This file was deleted.

98 changes: 0 additions & 98 deletions frontend/src/app/auth-test/csr/page.tsx

This file was deleted.

Loading