Skip to content

Commit

Permalink
fix not showing deployment key
Browse files Browse the repository at this point in the history
  • Loading branch information
Faithcaio committed Mar 24, 2018
1 parent 1b9688a commit 7958ae0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/project/Projects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ import ore.permission._
import ore.permission.scope.GlobalScope
import ore.project.factory.ProjectFactory
import ore.project.io.{InvalidPluginFileException, PluginUpload}
import ore.rest.ProjectApiKeyTypes
import ore.user.MembershipDossier._
import ore.{OreConfig, OreEnv, StatTracker}
import play.api.cache.{AsyncCacheApi, SyncCacheApi}
import play.api.i18n.MessagesApi
import security.spauth.SingleSignOnConsumer
import views.html.{projects => views}
import db.impl.OrePostgresDriver.api._

import scala.collection.JavaConverters._
import scala.concurrent.ExecutionContext.Implicits.global
Expand Down Expand Up @@ -426,7 +428,7 @@ class Projects @Inject()(stats: StatTracker,
def showSettings(author: String, slug: String) = SettingsEditAction(author, slug) async { request =>
implicit val r = request.request
val projectData = request.data
projectData.project.apiKeys.get(r.user.id.get).map { deployKey =>
projectData.project.apiKeys.find(_.keyType === ProjectApiKeyTypes.Deployment).map { deployKey =>
Ok(views.settings(projectData, request.scoped, deployKey))
}
}
Expand Down

0 comments on commit 7958ae0

Please sign in to comment.