Get if a user is in a specific alfresco site

随声附和 提交于 2020-01-07 03:01:45

问题


I am working in a JavaEE project and i want simply see if a user is a member of an private Alfresco site using CMIS. I need to see if the user is a member of this (private,public) Site and his current situation in this site.


回答1:


You cannot easily do this with CMIS alone. But you can use the SiteService because it has an isMember method. This would only work if your code is running in the same process as Alfresco (like in an action, behavior, or web script).

If you are running code in a separate process from Alfresco, consider writing a web script that would leverage the same method, then call your web script from your code using a rest client.

Alternatively, you could use the Site Members public REST API.

Resist the urge to use other "slingshot" REST URLs you might find unless they are explicitly marked as "public".



来源:https://stackoverflow.com/questions/38720618/get-if-a-user-is-in-a-specific-alfresco-site

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!