Skip to content

Conversation

@Poizon7
Copy link
Contributor

@Poizon7 Poizon7 commented Dec 11, 2025

Implements manual account requests by allowing the user to add all the information we'd usually get from kth ldap

resolves #27

@Poizon7 Poizon7 requested a review from foodelevator December 11, 2025 10:19
@Poizon7 Poizon7 changed the title feat: add manual account requests Add manual account requests Dec 11, 2025
@Poizon7 Poizon7 force-pushed the manual_account_requests branch from f3a7c91 to 4bf72af Compare December 11, 2025 10:27
Copy link
Member

@foodelevator foodelevator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems very promising

Comment on lines 18 to 28
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)
Copy link
Member

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

Email: accountRequest.Email,
FirstName: accountRequest.FirstName,
FamilyName: accountRequest.FamilyName,
YearTag: accountRequest.Email,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
YearTag: accountRequest.Email,
YearTag: accountRequest.YearTag,

handlers/user.go Outdated

_, err := s.DB.CreateAccountRequestManual(r.Context(), database.CreateAccountRequestManualParams{
Kthid: kthid,
UgKthid: "ug" + kthid,
Copy link
Member

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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good ඞ

@Poizon7 Poizon7 requested a review from foodelevator December 17, 2025 13:25
Copy link
Member

@foodelevator foodelevator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement account request without kth account

3 participants