有没有办法在Phabricator中配置全局电子邮件通知首选项?
我知道它允许管理每个用户的偏好设置(https://secure.phabricator.com/book/phabricator/article/mail_rules/#reducing-email),但我想配置默认参数以供所有新用户帐户继承。
如果能够批量更新现有用户帐户的电子邮件通知首选项,那就太棒了。
答案 0 :(得分:3)
作为管理员,请转到“设置”,然后点击“全局设置”。改变你想要的。这些将适用于所有新帐户。
答案 1 :(得分:1)
更新Phabricator实例中所有用户的电子邮件首选项:
1.在mysql控制台中运行以下SQL脚本:
use phabricator_user;
/*handle users who haven't customized their preferences yet (replace 'test' with name of your model user)*/
insert into user_preferences(userPHID, preferences) select l.PHID, (select p.preferences from user u join user_preferences p on (p.userPHID=u.PHID) where
u.userName = 'test') from user l where not exists(select * from user_preferences r where r.userPHID=l.PHID);
/*change individual parameters for all users*/
update user_preferences set preferences = replace(preferences, '"audit-add-ccs":1', '"audit-add-ccs":2');/*set A commit's subscribers change. to Ignore*/
update user_preferences set preferences = replace(preferences, '"audit-projects":1', '"audit-projects":2');
update user_preferences set preferences = replace(preferences, '"maniphest-priority":1', '"maniphest-priority":2');
update user_preferences set preferences = replace(preferences, '"maniphest-cc":1', '"maniphest-cc":2');
update user_preferences set preferences = replace(preferences, '"maniphest-projects":1', '"maniphest-projects":2');
update user_preferences set preferences = replace(preferences, '"maniphest-unblock":1', '"maniphest-unblock":2');
update user_preferences set preferences = replace(preferences, '"maniphest-column":1', '"maniphest-column":2');
update user_preferences set preferences = replace(preferences, '"maniphest-other":1', '"maniphest-other":2');
/*list current users' preferences*/
select u.phid, u.userName, p.preferences from user u left join user_preferences p on (p.userPhid=u.phid);
2.restart Phabricator守护进程和Web服务器:
./bin/phd restart
service httpd restart
免责声明:它在我的特定情况下适用于Phabricator的特定版本,但它肯定是“黑客”并且有可能损害用户偏好。