cancel
Showing results for 
Search instead for 
Did you mean: 

Default emailFeedDisabled to true for new users

dshookowsky
Confirmed Champ
Confirmed Champ

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?

5 REPLIES 5

cesarista
World-Class Innovator
World-Class Innovator

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.

afaust
Legendary Innovator
Legendary Innovator

Alternatively, a regular onCreateNode policy on cmSmiley Tongueerson should do the trick, and you can set the preferences JSON to a default value including disabling the feed.

cesarista
World-Class Innovator
World-Class Innovator

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).

GitHub - Redpill-Linpro/alfresco-defaultquota-policy: This module adds a policy allowing you to set ... 

Regards.

--C.

Thanks to both of you for the quick responses.  This looks like a good approach.