From dd74bbc17c97115df973fe9b9a17f7ce7bb6a99f Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 4 Jan 2021 07:51:37 -0500 Subject: Support multiple keys per user Every key is just a new line in the $USER.pub file. This is not automatically reflected to gitolite, which uses a separate config, so I'll need to come up with a way to replace gitolite someday. --- Biz/Namespace.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Biz/Namespace.hs') diff --git a/Biz/Namespace.hs b/Biz/Namespace.hs index 574a2fc..d3835c8 100644 --- a/Biz/Namespace.hs +++ b/Biz/Namespace.hs @@ -17,7 +17,7 @@ import qualified Data.Char as Char import qualified Data.List as List import qualified Text.Regex.Applicative as Regex -data Ext = Hs | Scm | Nix | Md | Css | Py | Sh | Key | Json | None +data Ext = Hs | Scm | Nix | Md | Css | Py | Sh | Keys | Json | None deriving (Eq, Show) data Namespace = Namespace [String] Ext @@ -38,7 +38,7 @@ match = Regex.match <| Namespace ext <|> Css <$ Regex.string "css" <|> Py <$ Regex.string "py" <|> Sh <$ Regex.string "sh" - <|> Key <$ Regex.string "key" + <|> Keys <$ Regex.string "pub" <|> Json <$ Regex.string "json" fromPath :: String -> String -> Maybe Namespace -- cgit v1.2.3