假设我有两个用户模型:
object Customer extends Customer with KeyedMetaMapper[Long, Customer] with MetaMegaProtoUser[Customer]
object User extends User with MetaMegaProtoUser[User]
均来自MegaProtoUser
. 一种用于前端,一种仅用于管理员登录,它们完全不同。现在我想我必须将两者都添加到站点地图中:
class Boot {
def boot {
val sitemap = List(
Menu.i("Home") / "index",
Menu.i("Admin") / "admin" / "index" submenus User.menus
) ::: Customer.menus
LiftRules.setSiteMap(SiteMap(sitemap:_*))
}
}
对我来说似乎很简单,但它会引发异常:
net.liftweb.sitemap.SiteMapException: Location Login defined twice
Loc(Login, <function1>, LinkText(<function1>), List(If(<function0>,<function0>), Template(<function0>)))
and
Loc(Login, <function1>, LinkText(<function1>), List(LocGroup(WrappedArray(public)),If(<function0>,<function0>), Template(<function0>)))
如何为管理员用户添加第二个登录和用户编辑区域?