Package controllers.residences

Source Code of controllers.residences.AdminController

package controllers.residences;

import models.User;


public class AdminController extends BaseAdminResidence {
  public static void index() {
    // Mock creation of users for testing the security and the diferents profiles access.
    User familiar = User.findByUsername("basoko");
    if(familiar == null) {
      familiar = new User();
      familiar.username = "basoko";
      familiar.password = "12345";
      familiar.save();
    }
   
    User interned = User.findByUsername("david");
    if(interned == null) {
      interned = new User();
      interned.username = "david";
      interned.password = "12345";
      interned.save();
    }

    render("residences/admin/index.html");
  }
}
TOP

Related Classes of controllers.residences.AdminController

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.