1

I have an existing jhipster app on which certain companies register and do various operations.

I want to have the functionality of a sub-user which will have the option of either edit/ delete/ view o entity depending on his role,

Is there an existing blueprint for this?

Nimantha
  • 6,405
  • 6
  • 28
  • 69
user1482800
  • 83
  • 2
  • 12
  • What is a sub-user? No blueprint as far as I understand your point. But it looks like normal roles and authorizations to me. What can't you do with existing role system? – Gaël Marziou Mar 10 '20 at 18:29
  • 1
    Hello, what I meant is a user signed up as a company and have many users within it as a sub user or users within that main company who based on role have access to the same main company data – user1482800 Mar 11 '20 at 04:42

1 Answers1

1

You can't achieve this by using static roles unless you have very few companies and they almost never change.

You should rather look at other Spring Security features like ACL or custom methods for use in expression language annotations. You should probably also have a look at multi-tenancy topic with Spring Security.

Anyway, you have to code it manually, few links to get you started:

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

You can also find some examples in JHipster:

Gaël Marziou
  • 16,028
  • 4
  • 38
  • 49