在CRUD的春季安全性中使用细粒度的RBAC?

时间:2019-05-07 21:43:27

标签: java spring web spring-security

我正在学习有关Spring的方法,我认为如果Spring Security可用于此目的,我会误解。

场景如下:

DB with tables items, users, user2item
guests may view all items, but not edit/delete/add
user1 has CRUD access to item_a_1, item_a_2, etc
user2 has CRUD access to item_b_1, item_b_2, etc

我应该如何实施粒度RBAC,以便每个用户只能为其指定的项目提供CRUD功能? Spring sec适合吗?除了长时间准备的语句以基于数据库匹配项获取条目外,我还能使用什么?听起来很无能为力,因为我在这里尝试避免自制方法,并且以前很少使用弹簧。

0 个答案:

没有答案