Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在当前项目中使用 Play2 Java,并希望实现自定义资产处理。主要思想是从控制器动作中调用 Assets.at() 动作,但我不知道如何处理这些事情。我不能只调用()它。所以我想实现某种资产授权,在用户角色之间分配资产。
我认为您不需要为此特别考虑。只需编写一个控制器来实现您的安全方案(例如使用动作组合)并像调用普通资产控制器一样调用它。