我们有一个外部身份管理系统,它必须使用 Sling 和 REST 管理 CQ5 中用户的生命周期。
我们能够创建和删除用户和组
POST http://$host:$port/libs/cq/security/authorizables/POST
Content: rep:userId=example@example.org&givenName=Example&familyName=Example&email=example@example.org&rep:password=random
POST http://$host:$port/home/users/e/example@example.org.delete.json
Content: deleteAuthorizable=1
我们的问题是我们没有找到 的方法。重命名 一个用户(或一个组)。
我们如何重命名用户?
我们找到的唯一解决方案是
虽然这个解决方案可以工作,但它很可能会带来一些性能问题(我们有超过 70K 的用户和超过 15K 的组)。如果这是唯一的解决方案:我们如何通过 REST 有效地执行第一步(列出所有成员)
最佳答案
知道这并不能解决您的问题,而只是指出通过 REST 重命名似乎是不可行的。 docs似乎相当明确:
The jackrabbit-usermanager bundle delivers a REST interface to create, update and delete users and groups in the JCR.
To update an existing user POST a request to /system/userManager/user/username.update.. You can NOT update the username or the password (see Change Password below) only the additional properties are updateable through this URL.
虽然在同一页面上,但似乎对特定用户的查询应该带回他们的组成员身份:
$ curl http://localhost:8080/system/userManager/user/admin.tidy.1.json
{
"memberOf": [],
"declaredMemberOf": []
}
不确定 CQ 是否以这种方式锁定对用户信息的访问。
关于aem - 通过 sling 重命名用户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11219976/