An application runs specific license checks against certain DAM assets every day. It should send an email to a configure

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

An application runs specific license checks against certain DAM assets every day. It should send an email to a configure

Post by answerhappygod »

An application runs specific license checks against certain DAM assets every day. It should send an email to a configured list if it finds warnings, and mark the asset accordingly. A service component that uses the Apache Sling Scheduler Service is created. DAM assets that must NOT be used anymore are hidden using
ACLs and the license check must re-check them.
How should a developer obtain a resource resolver that can read and update the DAM assets?

A. Set up a cron job with curl calls with the admin user and use request.getResourse().getResourceResolver().
B. Create a configuration line in PID com.day.cq.security.ACLSetup for the user that you obtain a session for via ResourceResolverFactory.getResourceResolver(...).
C. Configure the user admin in PID org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl as user.default and make sure the service user exists and has jcr:read and jcr:write permissions.
D. Create a configuration for PID org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-damaccess that references a pre-created service user with r/w permissions and use ResourceResolverFactory.getServiceResourceResolver(...).
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!

This topic has 1 reply

You must be a registered member and logged in to view the replies in this topic.


Register Login
 
Post Reply