07-11-2018 10:57 AM
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?
07-11-2018 11:28 AM
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.
07-11-2018 04:58 PM
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.
07-11-2018 05:26 PM
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.
07-11-2018 05:54 PM
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.
07-11-2018 07:53 PM
Thanks to both of you for the quick responses. This looks like a good approach.
Explore our Alfresco products with the links below. Use labels to filter content by product module.