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

Commit

Permalink
Drop IE6 support (png hack, useless)
Browse files Browse the repository at this point in the history
Clean parameters passed to bootstrap using exposed plugin configs instead.
Create aliases in window: pydio and pydioBootstrap objects:
  • Loading branch information
cdujeu committed Jan 19, 2015
1 parent 7915971 commit 60507c4
Show file tree
Hide file tree
Showing 25 changed files with 14 additions and 420 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/access.ajxp_conf/class.ConfigEditor.js
Expand Up @@ -165,7 +165,7 @@ Class.create("ConfigEditor",{
ajaxplorer.displayMessage("ERROR", MessageHash['ajxp_conf.39']);
return false;
}
if(pass.value.length < window.ajxpBootstrap.parameters.get("password_min_length")){
if(pass.value.length < parseInt(window.ajaxplorer.getPluginConfigs("core.auth").get("PASSWORD_MINLENGTH"))){
ajaxplorer.displayMessage("ERROR", MessageHash[378]);
return false;
}
Expand Down
6 changes: 3 additions & 3 deletions core/src/plugins/core.auth/manifest.xml
Expand Up @@ -7,10 +7,10 @@
</resources>
</client_settings>
<server_settings>
<global_param name="ENABLE_USERS" group="CONF_MESSAGE[Generic Auth Features]" type="boolean" label="CONF_MESSAGE[Enable Users]" description="CONF_MESSAGE[Activate the users management system to protect your Pydio installation.]" mandatory="true" default="true"/>
<global_param name="ENABLE_USERS" group="CONF_MESSAGE[Generic Auth Features]" type="boolean" label="CONF_MESSAGE[Enable Users]" description="CONF_MESSAGE[Activate the users management system to protect your Pydio installation.]" mandatory="true" default="true" expose="true"/>
<global_param name="CASE_SENSITIVE" group="CONF_MESSAGE[Generic Auth Features]" type="boolean" label="CONF_MESSAGE[Case Sensitive]" description="CONF_MESSAGE[Whether the users identifiers should be case sensitive or not]" mandatory="true" default="true"/>
<global_param name="ALLOW_GUEST_BROWSING" group="CONF_MESSAGE[Generic Auth Features]" type="boolean" label="CONF_MESSAGE[Guest Browsing]" description="CONF_MESSAGE[Enable the 'guest' user, who does not need to log in.]" mandatory="true" default="false"/>
<global_param name="PASSWORD_MINLENGTH" group="CONF_MESSAGE[Generic Auth Features]" type="string" label="CONF_MESSAGE[Password length]" description="CONF_MESSAGE[Minimum number of characters required for passwords in the application]" mandatory="true" default="8"/>
<global_param name="ALLOW_GUEST_BROWSING" group="CONF_MESSAGE[Generic Auth Features]" type="boolean" label="CONF_MESSAGE[Guest Browsing]" description="CONF_MESSAGE[Enable the 'guest' user, who does not need to log in.]" mandatory="true" default="false" expose="true"/>
<global_param name="PASSWORD_MINLENGTH" group="CONF_MESSAGE[Generic Auth Features]" type="integer" label="CONF_MESSAGE[Password length]" description="CONF_MESSAGE[Minimum number of characters required for passwords in the application]" mandatory="true" default="8" expose="true"/>
<global_param name="SESSION_SET_CREDENTIALS" group="CONF_MESSAGE[Generic Auth Features]" type="boolean" label="CONF_MESSAGE[Store Credentials in Session]" description="CONF_MESSAGE[Set the users credentials in the session after a successful login, this can be necessary when bridging specific auth and access plugins.]" mandatory="true" default="false"/>
<global_param name="SECURE_LOGIN_FORM" group="CONF_MESSAGE[Login Form]" type="boolean" label="CONF_MESSAGE[Secure Login Form]" description="CONF_MESSAGE[Raise the security of the login form by disabling autocompletion and remember me feature]" mandatory="true" default="false" expose="true"/>
<global_param name="ENABLE_FORGOT_PASSWORD" group="CONF_MESSAGE[Login Form]" type="boolean" label="CONF_MESSAGE[Enable Forgot Password]" description="CONF_MESSAGE[Add a Forgot Password link at the bottom of the login form]" mandatory="true" default="false" expose="true"/>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.auth/standard_auth_actions.xml
Expand Up @@ -36,7 +36,7 @@
var passSeed = null;
if($('user_change_ownpass1') && $('user_change_ownpass1').value && $('user_change_ownpass2').value)
{
if($('user_change_ownpass1').value.length < window.ajxpBootstrap.parameters.get("password_min_length")){
if($('user_change_ownpass1').value.length < parseInt(window.ajaxplorer.getPluginConfigs("core.auth").get("PASSWORD_MINLENGTH"))){
alert(MessageHash[378]);
return false;
}
Expand Down
4 changes: 0 additions & 4 deletions core/src/plugins/gui.ajax/class.AJXP_ClientDriver.php
Expand Up @@ -305,9 +305,6 @@ public function computeBootConf()
$config["usersEditable"] = ConfService::getAuthDriverImpl()->usersEditable();
$config["ajxpVersion"] = AJXP_VERSION;
$config["ajxpVersionDate"] = AJXP_VERSION_DATE;
if (stristr($_SERVER["HTTP_USER_AGENT"], "msie 6")) {
$config["cssResources"] = array("css/pngHack/pngHack.css");
}
$analytic = $this->getFilteredOption('GOOGLE_ANALYTICS_ID');
if (!empty($analytic)) {
$config["googleAnalyticsData"] = array(
Expand All @@ -317,7 +314,6 @@ public function computeBootConf()
);
}
$config["i18nMessages"] = ConfService::getMessages();
$config["password_min_length"] = ConfService::getCoreConf("PASSWORD_MINLENGTH", "auth");
$config["SECURE_TOKEN"] = AuthService::generateSecureToken();
$config["streaming_supported"] = "true";
$config["theme"] = $this->pluginConf["GUI_THEME"];
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

Expand Up @@ -89,6 +89,7 @@ Class.create("AjxpBootstrap", {
ajaxplorer.actionBar.selectorData = new Hash(this.parameters.get("SELECTOR_DATA"));
}
}.bind(this));
window.pydioBootstrap = this;
},
/**
* Real loading action
Expand Down Expand Up @@ -189,7 +190,7 @@ Class.create("AjxpBootstrap", {
window.multipleFilesDownloadEnabled = this.parameters.get("multipleFilesDownloadEnabled");
var masterClassLoaded = function(){
document.fire("ajaxplorer:boot_loaded");
window.ajaxplorer = new Ajaxplorer(this.parameters.get("EXT_REP")||"", this.parameters.get("usersEnabled"), this.parameters.get("loggedUser"));
window.pydio = window.ajaxplorer = new Ajaxplorer(this.parameters.get("EXT_REP")||"", this.parameters.get("usersEnabled"), this.parameters.get("loggedUser"));
if(this.parameters.get("currentLanguage")){
window.ajaxplorer.currentLanguage = this.parameters.get("currentLanguage");
}
Expand Down
Expand Up @@ -132,7 +132,7 @@ Class.create("AjxpUsersCompleter", Ajax.Autocompleter, {
Event.stop(event);
var close = false;
if(event.target.name == "ok"){
if( !createUserPass.value || createUserPass.value.length < ajxpBootstrap.parameters.get('password_min_length')){
if( !createUserPass.value || createUserPass.value.length < parseInt(window.ajaxplorer.getPluginConfigs("core.auth").get("PASSWORD_MINLENGTH"))){
alert(MessageHash[378]);
}else if(createUserPass.getValue() == createUserConfirmPass.getValue()){
li.NEW_USER_PASSWORD = createUserPass.getValue();
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer_boot.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions core/src/plugins/gui.ajax/res/js/lib/prototype/protopass.js
Expand Up @@ -53,8 +53,8 @@ var Protopass = Class.create({
}
}
}
if(window.ajxpBootstrap && window.ajxpBootstrap.parameters.get('password_min_length')){
this.options.minchar = window.ajxpBootstrap.parameters.get('password_min_length');
if(window.ajxpBootstrap && parseInt(window.ajaxplorer.getPluginConfigs("core.auth").get("PASSWORD_MINLENGTH"))){
this.options.minchar = parseInt(window.ajaxplorer.getPluginConfigs("core.auth").get("PASSWORD_MINLENGTH"));
}
Object.extend(this.options, options || { });
var ins = {};
Expand Down

0 comments on commit 60507c4

Please sign in to comment.