Default emailFeedDisabled to true for new users

cancel
Showing results for 
Search instead for 
Did you mean: 
dshookowsky
Active Member II

Default emailFeedDisabled to true for new users

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
cesarista
Customer

Re: Default emailFeedDisabled to true for 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. 

dshookowsky
Active Member II

Re: Default emailFeedDisabled to true for new users

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
Master

Re: Default emailFeedDisabled to true for new users

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
Customer

Re: Default emailFeedDisabled to true for new users

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.

dshookowsky
Active Member II

Re: Default emailFeedDisabled to true for new users

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