【发布时间】:2015-08-03 13:04:04
【问题描述】:
我通过以下方式创建具有最低权限的用户:
db.command(new OCommandScript("sql", "insert into orole set name = 'ardaRole', mode = 0")).execute();
db.command(new OCommandScript("sql", "update orole put rules = 'database.class', 2 where name = 'ardaRole'")).execute();
db.command(new OCommandScript("sql", "update orole put rules = 'database.function', 2 where name = 'ardaRole'")).execute();
db.command(new OCommandScript("sql", "update orole put rules = 'database.cluster', 2 where name = 'ardaRole'")).execute();
db.command(new OCommandScript("sql", "insert into ouser set name = 'arda', password = 'arda', status = 'ACTIVE', roles = (select from ORole where name = 'ardaRole')"))
.execute();
效果很好。如果您想检查我的项目中的权利,请查看:http://arda-maps.org:2480 with arda arda。
所以我的问题是这些权限仍然允许更改顶点名称(所以我将 LOVES 更改为 LOVESd)。但这正在扼杀整个数据库的结构和功能!
那么我怎样才能进一步限制这些权利呢?这真的很糟糕,因为我想让任何人都可以访问数据库。但是没有人应该能够改变刚才读到的任何东西......一定有办法......
【问题讨论】:
标签: java database orientdb rights