Browse Source

Main redirect if group 1 exists

master
pvincent 2 years ago
parent
commit
de0f10425b
  1. 6
      src/controller/Main.hx

6
src/controller/Main.hx

@ -29,8 +29,10 @@ class Main extends Controller {
if ( app.user!=null && group == null) {
throw Redirect("/user/choose");
}else if (app.user == null && (group==null || group.regOption!=db.Amap.RegOption.Open) ) {
//throw Redirect("/user/login");
throw Redirect("/group/1");
if (db.Amap.manager.get(1, false) != null) throw Redirect("/group/1");
else throw Redirect("/user/login");
}
view.amap = group;

Loading…
Cancel
Save