Permalink
Browse files

Sharing: add default parameters for notifications

  • Loading branch information...
1 parent 00bc4c0 commit 536db1089746f42be9c307f838c9cafc7780ab50 @cdujeu cdujeu committed Jul 1, 2016
@@ -17,6 +17,8 @@
<global_param name="AVOID_SHARED_FOLDER_SAME_LABEL" group="CONF_MESSAGE[Internal Sharing]" description="CONF_MESSAGE[Disallow users to create shared folders if a workspace already exists with the same label]" label="CONF_MESSAGE[Avoid labels duplication]" type="boolean" default="false"/>
<global_param name="SHARED_USERS_TMP_PREFIX" group="CONF_MESSAGE[Internal Sharing]" description="CONF_MESSAGE[Mandatory prefix for users created temporary users login]" label="CONF_MESSAGE[Tmp users prefix]" type="string" expose="true"/>
<global_param name="FORK_EVENT_FORWARDING" group="CONF_MESSAGE[Internal Sharing]" type="boolean" label="CONF_MESSAGE[Fork Events Forwarding]" description="CONF_MESSAGE[If you detect performances issues while modifiyng files under deep trees, try activating that one. Please be sure of what you do, this may trigger a whole lot of php processes on the server.]" default="false"/>
+ <global_param name="WATCHER_SHARES_AUTO_OWNER" group="CONF_MESSAGE[Notifications]" type="boolean" label="CONF_MESSAGE[Shares Owner]" description="CONF_MESSAGE[When sharing with some internal users, choose whether the owner will be notified by default of any event happening on this share]" default="false" expose="true"/>
+ <global_param name="WATCHER_SHARES_AUTO_USERS" group="CONF_MESSAGE[Notifications]" type="boolean" label="CONF_MESSAGE[Shares Target users]" description="CONF_MESSAGE[When sharing with some internal users, choose whether these users will be notified by default of any event happening on this share]" default="false" expose="true"/>
<global_param name="CUSTOM_SHAREPAGE_TITLE" group="CONF_MESSAGE[Weblink Page]" type="string" label="CONF_MESSAGE[Page Title]" description="CONF_MESSAGE[Share page title. Use AJXP_FILENAME keyword to display the file name.]" mandatory="false" default=""/>
<global_param name="CUSTOM_SHAREPAGE_LEGEND" group="CONF_MESSAGE[Weblink Page]" type="string" label="CONF_MESSAGE[Download text]" description="CONF_MESSAGE[Text displayed below the download button. Use AJXP_FILENAME keyword to display the file name, and PYDIO_APP_TITLE for the application title.]" mandatory="false" default=""/>
<global_param name="CUSTOM_SHAREPAGE_LEGEND_PASS" group="CONF_MESSAGE[Weblink Page]" type="string" label="CONF_MESSAGE[Download text w/ Pass]" description="CONF_MESSAGE[Text displayed below the download button when a password is mandatory. Use AJXP_FILENAME keyword to display the file name, and PYDIO_APP_TITLE for the application title.]" mandatory="false" default=""/>
@@ -171,6 +171,10 @@
}
var updatedData = [];
if(operation == 'add'){
+ let pluginsConfig = pydio.getPluginConfigs("action.share");
+ if(pluginsConfig.get('WATCHER_SHARES_AUTO_USERS')){
+ userData['WATCH'] = true;
+ }
this._pendingData['entries'].push(userData);
}else if(operation == 'remove'){
this._pendingData['entries'].map(function(entry){
@@ -244,7 +248,12 @@
return this._pendingData[name];
}
if(name == 'watch') {
- return this._data["element_watch"] == 'META_WATCH_BOTH';
+ if(this._data["element_watch"] !== undefined){
+ return this._data["element_watch"] == 'META_WATCH_BOTH';
+ }else{
+ let pluginConfigs = pydio.getPluginConfigs("action.share");
+ return pluginConfigs.get('WATCHER_SHARES_AUTO_OWNER');
+ }
}else{
return this._data[name];
}

0 comments on commit 536db10

Please sign in to comment.