Skip to content

Commit 2773b35

Browse files
jankeromnesroboquat
authored andcommitted
[dashboard] Prevent adding 'gmail.com' as a verified student email domain
1 parent 3b4e7ec commit 2773b35

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

components/dashboard/src/admin/UserDetail.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ export default function UserDetail(p: { user: User }) {
5454
};
5555

5656
const addStudentDomain = async () => {
57+
if (emailDomain === 'gmail.com') {
58+
throw new Error(`Sanity check: Not adding '${emailDomain}' as a verified student email domain`);
59+
}
5760
await updateUser(async u => {
5861
await getGitpodService().server.adminAddStudentEmailDomain(u.id, emailDomain);
5962
await getGitpodService().server.adminIsStudent(u.id).then(

0 commit comments

Comments
 (0)