设计工作空间 - 会话范围最好?

发布于 2024-11-27 07:02:57 字数 296 浏览 4 评论 0原文

Grails 新手 - 我正在构建一个简单的 Grails 应用程序,用户将在顶级域对象(“工作区”)范围内处理域层次结构中的对象。例如,如果我的域对象是项目作者(1-M)和作者评论(1-M),我只希望当前所选项目的作者和评论对用户可见(他们可以切换项目/但工作区)。

从设计原则来看,存储当前“工作场所”的索引最好在会话范围内完成,还是作为持久的“用户首选项”对象?这需要对控制器进行大量的返工,所以我对是否走这条路犹豫不决。

安全性可能会成为一个问题,因此我犹豫是否要参数化每个“工作区”的所有 URL。

任何建议将不胜感激。

Grails newbie - I'm building a simple Grails app where a user will be working on objects down the domain hierarchy within the scope of a top-level domain object - the "workspace". For example, if my domain objects are project-author (1-M) and author-comments (1-M), I only want the authors and comments for the currently selected project to be visible to the user (they can switch projects/workspaces though).

From a design principle, is storing the index of the current "workplace" best done in session scope, or as a persisted "user preferences" object? This would require quite a bit of rework on the controllers, so I'm hesitant to go down this route.

Security may become an issue, so I'm hesitant to parameterize all my URLs for each "workspace".

Any advice would be appreciated.

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

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

发布评论

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

评论(1

二货你真萌 2024-12-04 07:02:58

基本上,目前有两种方法可以使用现有插件来处理此问题:

  1. 多租户核心
  2. < a href="http://www.grails.org/plugin/spring-security-acl" rel="nofollow">Spring Security ACL

Basically there are currently two ways to deal with this by using existing plugins:

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