(refs #115)Add repository permission checking

This commit is contained in:
takezoe
2014-03-11 02:30:11 +09:00
parent f78cdb637d
commit af0b52448a
2 changed files with 43 additions and 27 deletions

View File

@@ -16,7 +16,6 @@ class PublicKeyAuthenticator(context: ServletContext) extends PublickeyAuthentic
override def authenticate(username: String, key: PublicKey, session: ServerSession): Boolean = {
Database(context) withTransaction {
// TODO Check permission to the repository here?
getPublicKeys(username).exists { sshKey =>
str2PublicKey(sshKey.publicKey) match {
case Some(publicKey) => key.equals(publicKey)