-
Notifications
You must be signed in to change notification settings - Fork 0
Add manual account requests #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f3a7c91 to
4bf72af
Compare
foodelevator
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems very promising
| alter table account_requests | ||
| drop column ug_kthid text; | ||
|
|
||
| alter table account_requests | ||
| drop column first_name text; | ||
|
|
||
| alter table account_requests | ||
| drop column family_name text; | ||
|
|
||
| alter table account_requests | ||
| drop column email text; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| alter table account_requests | |
| drop column ug_kthid text; | |
| alter table account_requests | |
| drop column first_name text; | |
| alter table account_requests | |
| drop column family_name text; | |
| alter table account_requests | |
| drop column email text; | |
| alter table account_requests | |
| drop column ug_kthid | |
| alter table account_requests | |
| drop column first_name; | |
| alter table account_requests | |
| drop column family_name; | |
| alter table account_requests | |
| drop column email; |
| started = "Internal server started" | ||
| } | ||
| slog.Info(started, "address", "http://localhost:"+port, "config", config.Config) | ||
| slog.Info(started, "address", "http://localhost:"+port) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would kind of like to keep this in dev, but yeah it was leaking secrets in prod which is perhaps not ideal
handlers/admin.go
Outdated
| Email: accountRequest.Email, | ||
| FirstName: accountRequest.FirstName, | ||
| FamilyName: accountRequest.FamilyName, | ||
| YearTag: accountRequest.Email, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| YearTag: accountRequest.Email, | |
| YearTag: accountRequest.YearTag, |
handlers/user.go
Outdated
|
|
||
| _, err := s.DB.CreateAccountRequestManual(r.Context(), database.CreateAccountRequestManualParams{ | ||
| Kthid: kthid, | ||
| UgKthid: "ug" + kthid, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really a good idea? i would probably do something like dsekt: so that it definitely won't crash. if i recall correctly, they always start with u1, so i guess this might never collide anyways
| <form class="p-6 flex flex-col gap-4" hx-post="/request-account"> | ||
| <label for="reference"> | ||
| Reference: <span class="text-sm">(a person)</span> | ||
| Reference: <span class="text-sm">(a person who can vouch for you)</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very good ඞ
foodelevator
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Implements manual account requests by allowing the user to add all the information we'd usually get from kth ldap
resolves #27