在现有的 jhipster 应用程序中创建子用户

Create subusers within an existing jhipster app

我有一个现有的 jhipster 应用程序,某些公司在上面注册并进行各种操作。

我想要子用户的功能,根据他的角色可以选择编辑/删除/查看实体,

是否有现成的蓝图?

除非你的公司很少而且它们几乎从不改变,否则你无法通过使用静态角色来实现这一点。

您应该查看其他 Spring 安全功能,例如 ACL 或用于表达式语言注释的自定义方法。您可能还应该查看具有 Spring 安全性的多租户主题。

无论如何,你必须手动编码,几个链接可以让你开始:

  1. https://www.baeldung.com/spring-security-acl
  2. How to create custom methods for use in spring security expression language annotations

您还可以在 JHipster 中找到一些示例: