我可以使用 RDFox 版本 3 设置对知识图的仅查看访问权限吗?(无编辑)
我想创建不同的用户角色并控制谁可以查看/编辑什么,直到三级。
是的,使用访问控制功能,您可以为用户分配角色和授予权限,例如,您可以将用户权限限制为仅查看。
例如,您可以使用role命令和create子命令来创建新用户:
role create user1
Enter the password for the new role:
Confirm the password:
A new role was created with name "user1".
role create group
Enter the password for the new role:
Confirm the password:
A new role was created with name "group”.
然后您可以授予权限,例如:
> grant privileges read,write,grant >datastores|* to user1
The privileges 'read,write,grant' over resource specifier ">datastores|*" were granted to the role "user1" (if not already present).
或者您可以撤销权限,例如:</p>
> revoke privileges write,grant >datastores|* from user1
The privileges 'write,grant' over resource specifier ">datastores|*" were revoked from the role "user1" (if they were present).
如果您随后使用show子命令,您可以查看用户拥有的角色和权限:
> role show user1
'user1' has the following directly assigned privileges:
Resource specifier | Allowed access types
>datastores|* | read
这导致用户具有只读权限。