【问题标题】:Restricting email notification for private site in alfresco限制露天私人网站的电子邮件通知
【发布时间】:2014-05-09 15:37:38
【问题描述】:

我添加了一个脚本,用于在创建站点时发送邮件。如果创建的站点是私人站点,如何限制电子邮件通知。这是我的java脚本

var mail = actions.create("mail");

var node = people.getGroup("GROUP_EMAIL_CONTRIBUTORS");

    if(node){
       var members = people.getMembers(node);         
    }
mail.parameters.from = "Administrator@community.com"
mail.parameters.subject=" A new site called " + document.properties.name+" is created"; 
mail.parameters.text="Click http://sameer_w7:8080/share/page/site/" +   document.properties.name + "/dashboard" + "   to join the site";

 for(var i=0;i<members.length;i++)
 {
  mail.parameters.to = members[i].properties.email;
 //execute action against a document
 mail.execute(document);
 }

【问题讨论】:

    标签: alfresco alfresco-share


    【解决方案1】:

    您可以获得网站的siteVisibility状态。

    查看SiteService Wiki 页面。

    这样的事情应该可以工作:

    if (document.properties["st:siteVisibility"] != "PRIVATE"){
    <your email action here>
    }
    

    确保您在规则中选择了 st:site 类型,否则添加额外的检查。

    【讨论】:

    • 谢谢我没有修改脚本,但我修改了规则并且 st:site 包含 public 并且它正在工作
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多