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

Commit 9737f2e

Browse files
committed
Disable logo click is use is not authorized to switch to the associated workspace ( mostly ajxp_home ).
1 parent fc11e63 commit 9737f2e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

core/src/plugins/gui.ajax/res/js/ui/prototype/class.LogoWidget.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Class.create("LogoWidget", AjxpPane, {
2929
this._imagePlugin = parts[0];
3030
this._imageParameter = parts[1];
3131

32-
var configs = ajaxplorer.getPluginConfigs(this._imagePlugin);
32+
var configs = pydio.getPluginConfigs(this._imagePlugin);
3333
this.updateConfig(configs);
3434
if(options.link){
3535
var linkTitle;
@@ -39,7 +39,10 @@ Class.create("LogoWidget", AjxpPane, {
3939
}
4040
var clickObs = function(){
4141
if(options.link.startsWith('triggerRepositoryChange:')){
42-
ajaxplorer.triggerRepositoryChange(options.link.replace('triggerRepositoryChange:',''));
42+
var repoId = options.link.replace('triggerRepositoryChange:', '');
43+
if(pydio.user && pydio.user.repositories && pydio.user.repositories.get(repoId)) {
44+
pydio.triggerRepositoryChange(repoId);
45+
}
4346
}else{
4447
if(options.linkTarget && options.linkTarget == 'new'){
4548
window.open(options.link);
@@ -112,7 +115,7 @@ Class.create("LogoWidget", AjxpPane, {
112115
this.imageIsDefault = true;
113116
// Get parameters defaults
114117
$A([this._imageParameter + "_H", this._imageParameter + "_W",this._imageParameter + "_L", this._imageParameter + "_T"]).each(function(param){
115-
var v = XPathGetSingleNodeText(ajaxplorer.getXmlRegistry(), "plugins/*[@id='gui.ajax']/server_settings/global_param[@name='"+param+"']/@default");
118+
var v = XPathGetSingleNodeText(pydio.getXmlRegistry(), "plugins/*[@id='gui.ajax']/server_settings/global_param[@name='"+param+"']/@default");
116119
if(!v) v = 0;
117120
configs.set(param, parseInt(v));
118121
});

0 commit comments

Comments
 (0)