Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Prevent some plugins to be disabled - Close #873
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Mar 18, 2015
1 parent 7abfda2 commit 73ca9a7
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/access.ajxp_conf/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ajxpdriver name="ajxp_conf" label="CONF_MESSAGE[Admin Driver]" description="CONF_MESSAGE[Access Pydio configuration data.]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<ajxpdriver name="ajxp_conf" enabled="always" label="CONF_MESSAGE[Admin Driver]" description="CONF_MESSAGE[Access Pydio configuration data.]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<plugin_info>
<core_relation packaged="true" tested_version="4.2.0"/>
<plugin_author>Charles du Jeu</plugin_author>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.ajxp_home/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ajxpdriver id="access.ajxp_home" label="CONF_MESSAGE[Welcome Page]" description="CONF_MESSAGE[Welcome Page displaying a list of workspaces]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<ajxpdriver id="access.ajxp_home" enabled="always" label="CONF_MESSAGE[Welcome Page]" description="CONF_MESSAGE[Welcome Page displaying a list of workspaces]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<client_settings icon="plugins/access.ajxp_home/share.png">
<resources>
<i18n namespace="user_home" path="plugins/access.ajxp_home/i18n" />
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.ajxp_user/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ajxpdriver id="access.ajxp_user" label="CONF_MESSAGE[User Dashboard]" description="CONF_MESSAGE[User home dashboard, can be displayed before accessing to workspaces]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<ajxpdriver id="access.ajxp_user" enabled="always" label="CONF_MESSAGE[User Dashboard]" description="CONF_MESSAGE[User home dashboard, can be displayed before accessing to workspaces]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<client_settings icon="plugins/access.ajxp_user/share.png">
<resources>
<i18n namespace="user_dash" path="plugins/access.ajxp_user/i18n" />
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/authfront.session_login/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ajxpcore id="authfront.session_login" enabled="true" label="CONF_MESSAGE[Standard login screen]"
<ajxpcore id="authfront.session_login" enabled="always" label="CONF_MESSAGE[Standard login screen]"
description="CONF_MESSAGE[Display a standard user/password login screen]"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<class_definition filename="plugins/authfront.session_login/class.SessionLoginFrontend.php" classname="SessionLoginFrontend"/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.ajaxplorer/ajxp_registry.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
<xs:attribute name="name" use="optional" type="xs:NCName"/>
<xs:attribute name="label" use="required"/>
<xs:attribute name="description" use="required"/>
<xs:attribute name="enabled" use="optional" type="xs:boolean"/>
<xs:attribute name="enabled" use="optional" type="xs:string"/>
<xs:attribute name="mixins" use="optional" type="xs:string"/>
</xs:complexType>

Expand Down
7 changes: 5 additions & 2 deletions core/src/plugins/editor.ajxp_plugin/class.PluginEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ Class.create("PluginEditor", AbstractEditor, {
var params = XPathSelectNodes(xmlData, "//global_param");
var values = XPathSelectNodes(xmlData, "//plugin_settings_values/param");
var documentation = XPathSelectSingleNode(xmlData, "//plugin_doc");
var enabledAlways = false;
try{enabledAlways = xmlData.firstChild.firstChild.attributes['enabled'].value === 'always';}catch (e){}


var paramsValues = new Hash();
$A(values).each(function(child){
Expand All @@ -145,7 +148,7 @@ Class.create("PluginEditor", AbstractEditor, {


var driverParamsHash = $A([]);
if(this.pluginId.split("\.")[0] != "core"){
if(this.pluginId.split("\.")[0] != "core" && !enabledAlways){
driverParamsHash.push($H({
name:'AJXP_PLUGIN_ENABLED',
type:'boolean',
Expand Down Expand Up @@ -184,7 +187,7 @@ Class.create("PluginEditor", AbstractEditor, {
this.formManager.createParametersInputs(form, driverParamsHash, true, (paramsValues.size()?paramsValues:null));
this.formManager.disableShortcutsOnForm(form);
}else{
form.update(MessageHash['ajxp_conf.105']);
form.update('<div style="padding: 10px;">No options for this plugin</div>');
}

if(form.SF_accordion){
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<guidriver id="gui.ajax" label="CONF_MESSAGE[Client Plugin]" description="CONF_MESSAGE[Browser-based rich interface. Contains configurations for theming, custom welcome message, etc.]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<guidriver id="gui.ajax" label="CONF_MESSAGE[Client Plugin]" description="CONF_MESSAGE[Browser-based rich interface. Contains configurations for theming, custom welcome message, etc.]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd" enabled="always">
<client_settings>
<resources>
<i18n namespace="ajax_gui" path="plugins/gui.ajax/res/i18n"/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.user/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ajxp_plugin id="gui.user" enabled="true" description="User access point" label="User access point"
<ajxp_plugin id="gui.user" enabled="always" description="User access point" label="User access point"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">

<client_settings>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/log.sql/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<logdriver name="sql" label="CONF_MESSAGE[DB Storage]" description="CONF_MESSAGE[Stores the logs in an SQL database.]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd" mixins="dibidriver_consumer">
<logdriver name="sql" enabled="always" label="CONF_MESSAGE[DB Storage]" description="CONF_MESSAGE[Stores the logs in an SQL database.]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd" mixins="dibidriver_consumer">
<client_settings>
<resources>
<i18n namespace="sql_logger" path="plugins/log.sql/i18n"/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/log.text/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<logdriver name="text" label="CONF_MESSAGE[Text logger]" description="CONF_MESSAGE[Stores the logs as readable tab delimited text.]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<logdriver name="text" enabled="always" label="CONF_MESSAGE[Text logger]" description="CONF_MESSAGE[Stores the logs as readable tab delimited text.]" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<class_definition filename="plugins/log.text/class.textLogDriver.php" classname="textLogDriver"/>
<client_settings>
<resources>
Expand Down

0 comments on commit 73ca9a7

Please sign in to comment.