Skip to content

Commit

Permalink
default admin data changed
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatov committed Aug 5, 2011
1 parent 33b5427 commit 5c15bd6
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/main/scala/scala/tools/colladoc/boot/ColladocBoot.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,29 @@ import net.liftweb.common.Empty
* @author Sergey Ignatov
*/
object ColladocBoot {
def boot {
addDefaultAdmin
loadProperties
def boot() {
addDefaultAdmin()
loadProperties()
}

def addDefaultAdmin {
val name = "colladoc"
val pass = "colladoc"
def addDefaultAdmin() {
val userName = "colladoc"
val password = "colladoc"
val firstName = "Colladoc"
val email = "colladoc@scala-webapps.epfl.ch"
val isSuperUser = true

if (User.count() == 0)
User.create.userName(name).password(pass).superUser(isSuperUser).save
User.create.
userName(userName).
password(password).
firstName(firstName).
email(email).
superUser(isSuperUser).
save
}

def loadProperties {
def loadProperties() {
Props.props.foreach { case (k, v) =>
if (k.startsWith("-doc"))
Properties.get(k) match {
Expand Down

0 comments on commit 5c15bd6

Please sign in to comment.