-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding beta white list; removing admin-only filter
- Loading branch information
Showing
6 changed files
with
63 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package db.dao | ||
|
||
import java.util.UUID | ||
import org.joda.time.DateTime | ||
|
||
import com.trifectalabs.roadquality.v0.models.SegmentRating | ||
|
||
import scala.concurrent.Future | ||
|
||
// TODO: Remove after beta | ||
trait BetaUserWhitelistDao { | ||
def exists(email: String): Future[Boolean] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package db.dao | ||
|
||
import javax.inject.{Inject, Singleton} | ||
|
||
import db.MyPostgresDriver | ||
import db.Tables._ | ||
import play.api.db.slick.{DatabaseConfigProvider, HasDatabaseConfigProvider} | ||
|
||
import scala.concurrent.{ExecutionContext, Future} | ||
|
||
// TODO: Remove after beta | ||
@Singleton | ||
class PostgresBetaUserWhitelistDao @Inject() (protected val dbConfigProvider: DatabaseConfigProvider)(implicit ec: ExecutionContext) | ||
extends BetaUserWhitelistDao with HasDatabaseConfigProvider[MyPostgresDriver] { | ||
import _root_.db.TablesHelper._ | ||
import profile.api._ | ||
|
||
override def exists(email: String): Future[Boolean] = { | ||
db.run(betaUserWhitelist.filter(m => m.email === email.trim).exists.result) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters