aboutsummaryrefslogtreecommitdiffstats
path: root/src/student.rs
diff options
context:
space:
mode:
authorYigit Sever2022-04-15 19:01:40 +0300
committerYigit Sever2022-04-15 19:01:40 +0300
commitf12685e32689b620d6096ec91ba3a3f495342925 (patch)
tree7f7ba75511980e1877a3ffde53fc51399205660c /src/student.rs
parentbacedcecc51d4f8be610c6a1f4c1d0643faf8146 (diff)
downloadgradecoin-f12685e32689b620d6096ec91ba3a3f495342925.tar.gz
gradecoin-f12685e32689b620d6096ec91ba3a3f495342925.tar.bz2
gradecoin-f12685e32689b620d6096ec91ba3a3f495342925.zip
[WIP] first part of lazy users overhaul
Diffstat (limited to 'src/student.rs')
-rw-r--r--src/student.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/student.rs b/src/student.rs
index 4b7acf1..711eeeb 100644
--- a/src/student.rs
+++ b/src/student.rs
@@ -26,6 +26,7 @@ pub struct User {
26} 26}
27 27
28/// The values are hard coded in [`static@OUR_STUDENTS`] so `MetuId::new`() can accept/reject values based on that 28/// The values are hard coded in [`static@OUR_STUDENTS`] so `MetuId::new`() can accept/reject values based on that
29/// TODO update the statement above
29#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] 30#[derive(Serialize, Deserialize, Debug, PartialEq, Clone)]
30pub struct MetuId { 31pub struct MetuId {
31 id: String, 32 id: String,
@@ -46,10 +47,14 @@ impl MetuId {
46 None 47 None
47 } 48 }
48 } 49 }
50
51 // TODO: replace the function above with this <15-04-22, yigit> //
52 pub fn _new(id: String, passwd: String) -> Self {
53 MetuId { id, passwd }
54 }
49} 55}
50 56
51// TODO: remove this, read from a yaml or something, then MetuId::new gets a self <11-04-22, yigit> // 57// TODO: remove this, read from a yaml or something, then MetuId::new gets a self <11-04-22, yigit> //
52
53// Students who are authorized to have Gradecoin accounts 58// Students who are authorized to have Gradecoin accounts
54lazy_static! { 59lazy_static! {
55 static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = { 60 static ref OUR_STUDENTS: HashSet<(&'static str, &'static str)> = {