I know that I can post to /alfresco/service/slingshot/profile/userprofile with a json payload
{ "username": "user@example.org", "properties":{"cm:emailFeedDisabled": true } } to disable the setting for individual users.
Unfortunately, that only works for existing users and I'd have to repeat the process for new users as they're added to the system. Is there a way to globally set the default value of emailFeedDisabled for all new users?
A possibility is to define a quartz job that is run daily after LDAP users sync.
The job would run a query for obtaining those users whose emailFeedDisabled parameter is true, and then you may iterate over them and change the corresponding parameter to false.
Regards.
--C.
We're not doing a full directory sync at the moment. Users are added as they authenticate. It looks like we have to somehow override the user model to provide the property value, but I was hoping for something simpler, like a configuration flag in a property file or database field.
Alternatively, a regular onCreateNode policy on cmerson should do the trick, and you can set the preferences JSON to a default value including disabling the feed.
Yes, Axel's option is the most suitable in fact. I remember an old example of policy (by Jared Ottey) for setting quota on created users that should be very similar to this case. But Daniel, you will have to program a little bit (in both cases).
Regards.
--C.
Thanks to both of you for the quick responses. This looks like a good approach.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.