通过 Liferay Web 服务更改文档库项目的权限
我已使用 Portlet_DL_DLFileEntryService
(/tunnel-web/secure/axis/Portlet_DL_DLFileEntryService
) 将一些文件上传到文档库。现在我想修改他们的权限。如果我是对的,我可以使用 Portal_PermissionService
(/tunnel-web/secure/axis/Portal_PermissionService
) 来做到这一点。有人能给我一些可行的例子吗?简单的soapUI 请求就可以了。
例如,我有一个 DLFileEntrySoap
实例,并希望向 Guest
角色和 VIEW
添加 VIEW
权限,并且Publisher
角色的 UPDATE
权限。我应该调用Portal_PermissionService
的哪个方法?该方法的参数值是多少?
I've uploaded some files to the Document Library with the Portlet_DL_DLFileEntryService
(/tunnel-web/secure/axis/Portlet_DL_DLFileEntryService
). Now I'd like modify their permissions. If I'm right I could do that with the Portal_PermissionService
(/tunnel-web/secure/axis/Portal_PermissionService
). Could someone give me some working examples? Simple soapUI requests would be fine.
For example, I've a DLFileEntrySoap
instance and want to add VIEW
permission to the Guest
role and VIEW
and UPDATE
permissions to the Publisher
role. Which method of the Portal_PermissionService
should I call and what are the values of the parameters of the method?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该使用
Portal_ResourcePermissionService
而不是Portal_PermissionService
,它具有以下方法:setIndividualResourcePermissions(long groupId, long companyId, String name, String primKey, long roleId, String[] actionIds)
其中:
com.liferay.portlet.documentlibrary。 model.DLFileEntry
或com.liferay.portlet.documentlibrary.model.DLFolder
fileEntry.getPrimaryKey()
或folder.getPrimaryKey()
Portal_RoleService< 获取/code>
VIEW
、DELETE
)You should use
Portal_ResourcePermissionService
instead ofPortal_PermissionService
, it has the following method:setIndividualResourcePermissions(long groupId, long companyId, String name, String primKey, long roleId, String[] actionIds)
where:
com.liferay.portlet.documentlibrary.model.DLFileEntry
orcom.liferay.portlet.documentlibrary.model.DLFolder
fileEntry.getPrimaryKey()
orfolder.getPrimaryKey()
Portal_RoleService
VIEW
,DELETE
)