diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js index 43b5362d0098964cdeb49e6873e2055c41966e82..2421b7fb60c3ede32861aa6d67b661ef5861f040 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/config/Profile.js @@ -96,6 +96,7 @@ $.extend(DefaultProfile.prototype, { } } + this.isAdmin = false; this.searchDomains = [ { "@id" : -1, "@type" : "GobalSearch", label : "Global", name : "global"}]; this.inventorySpaces = ["MATERIALS", "METHODS"]; //"STOCK_CATALOG" this.inventorySpacesReadOnly = []; //"STOCK_ORDERS" @@ -722,6 +723,14 @@ $.extend(DefaultProfile.prototype, { }); } + this.initIsAdmin = function(callback) { + var _this = this; + this.serverFacade.listPersons(function(data) { + _this.isAdmin = !(data.error); + callback(); + }); + } + // // Initializes // @@ -732,7 +741,9 @@ $.extend(DefaultProfile.prototype, { _this.initVocabulariesForSampleTypes(function() { _this.initSearchDomains(function() { _this.initDirectLinkURL(function() { - callbackWhenDone(); + _this.initIsAdmin(function() { + callbackWhenDone(); + }); }); }); }); diff --git a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js index 35caa3b38eac86fe2d634b1c27fe3079ae432fc6..9767c6acf0390fce0fba0cf091a2d9bc610fa655 100644 --- a/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js +++ b/openbis_standard_technologies/dist/core-plugins/eln-lims/1/as/webapps/eln-lims/html/js/views/SideMenu/SideMenuWidgetView.js @@ -253,7 +253,7 @@ function SideMenuWidgetView(sideMenuWidgetController, sideMenuWidgetModel) { treeModelUtils.push({ title : "Storage Manager", entityType: "STORAGE_MANAGER", key : "STORAGE_MANAGER", folder : false, lazy : false, view : "showStorageManager" }); } - if(profile.mainMenu.showUserManager) { + if(profile.mainMenu.showUserManager && profile.isAdmin) { treeModelUtils.push({ title : "User Manager", entityType: "USER_MANAGER", key : "USER_MANAGER", folder : false, lazy : false, view : "showUserManagerPage", icon : "fa fa-users" }); }