Chuyển đến nội dung chính

Bài đăng

Đang hiển thị bài đăng từ Tháng 4, 2016

[SYSTEM] Get administrator session in service

Goal: To write data/nodes to content (specifically to /etc/userdata) when a user logs in. We can achieve this in 2 ways (either way, the user needs to be a 'system user') Process 1: Step 1: Use in-built system user in OSGI configuration. In OSGI select Apache Sling Service User Mapper Service group.abc.commons-service:writeService=oauthservice (where 'oauthservice' is a system user) Step 2: Assign that system user the permissions to access the content folder. You see the system users in CRX at: /home/users/system Process 2: Step 1: Create a new system user. to do this Open http://localhost:4502/crx/explorer/index.jsp Login as admin > Open 'User Administration > Select 'Create System User' > Enter "user id" > Hit the Green button (you will not se a save button :) I have created "abcwriteservice" user Step 2: Go to Permissions, and for the user 'abcwriteservice' give Permissions to access the f...