From c88d98b6a2923a6e109d1ab64bce545105f13fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Tue, 20 Mar 2018 18:37:16 +0100 Subject: [PATCH] Handle capitalized user names --- ofborg/src/acl.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ofborg/src/acl.rs b/ofborg/src/acl.rs index 7bcb1f0..d05a3c1 100644 --- a/ofborg/src/acl.rs +++ b/ofborg/src/acl.rs @@ -6,7 +6,13 @@ pub struct ACL { } impl ACL { - pub fn new(repos: Vec, trusted_users: Vec, known_users: Vec) -> ACL { + pub fn new( + repos: Vec, + mut trusted_users: Vec, + mut known_users: Vec + ) -> ACL { + trusted_users.iter_mut().map(|x| *x = x.to_lowercase()).last(); + known_users.iter_mut().map(|x| *x = x.to_lowercase()).last(); return ACL { trusted_users: trusted_users, known_users: known_users,