机器人腿 注销

发布于 2024-10-05 06:00:43 字数 93 浏览 0 评论 0原文

我正在构建一个 Robotlegs 应用程序,您必须登录才能使用它。当你登录时,我有很多中介器、注入器、模型、vos 等。注销时我应该删除什么?

提前致谢。

I am building a robotlegs app where you have to login in order to use it. When you loggin I have numerous mediators,injectors,models,vos etc. What should I remove when one logs out?

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

幸福不弃 2024-10-12 06:00:43

这个问题很难回答,因为你的问题有点模糊。有关内部结构的更多细节将会有所帮助。根据您的情况,您可能只需要删除允许用户访问需要登录的内容的任何导航元素。如果您的用户由持久对象表示,您还可以使用 isLoggedIn< /code> 标志,当用户尝试执行需要登录的操作时,您将进行检查。同样,由于问题含糊不清,这很难回答,但我认为您不需要对 RobotLegs 有任何真正特定的东西这样做,更多的是关于应用程序设计。

This is tough to answer, since your question is kind of vague. Some more details as to the inner structure would be helpful. Depending on your situation, you may just need to remove any navigation elements that would let the user access content that would require them to be logged in. If your user is represented by a persistent object, you could also use an isLoggedIn flag that you would check when the user tries doing something that requires them to be logged in. Again, this is tough to answer because of the question's vagueness, but I don't think there's anything really specific to RobotLegs you need to do, it's more about application design.

为人所爱 2024-10-12 06:00:43

中介器中有一个 onRemove 函数,其工作方式类似于 onRegister,它应该删除中介器中所有已注册的事件。看看吧,它可能就是您正在寻找的。

斯蒂芬

There is a onRemove function in the mediator which works like onRegister, it should remove all the registered events in your mediator. Have a look, it may be what you're looking for.

Stephen

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文