cancel
Showing results for 
Search instead for 
Did you mean: 

Remove/Hide Admin tool from Admin Tools Page of Share

4535992
Star Collaborator
Star Collaborator

I want ot remove/hide the voice !"Uploader Plus Admin" from the page "Admin Tool" of Alfresco Share.

I based my work on the tutorial :

https://docs.alfresco.com/5.1/tasks/dev-extensions-share-tutorials-custom-header-admin-menu.html

I make my extension and all and now i'm ovverriding the "share-header.get.js" file of Alfresco Share.

Here the code i make so far, but it's seem no to work.

//Find the admin menu - it'll only be present if the current user is Admin...
//https://docs.alfresco.com/5.1/tasks/dev-extensions-share-tutorials-custom-header-admin-menu.html
var adminMenuConsole = widgetUtils.findObject(model.jsonModel, "id", "HEADER_ADMIN_CONSOLE");
if (adminMenuConsole != null && adminMenuConsole.config && adminMenuConsole.config.widgets)
{
    //ARRAY OF GROUP
    var adminMenuConsoleWidgets = adminMenuConsole.config.widgets;
    //GET TOOLS  GROUP USUALYY THE FIRST
    var adminMenuConsoleToolsWidget = adminMenuConsoleWidgets[0];
    
    var adminMenuConsoleTools = adminMenuConsoleToolsWidget.config.widgets;
    // THIS I'M DOING SOMETHING VERY STUPID ????????????????
    widgetUtils.deleteObjectFromArray(adminMenuConsoleTools, "targetUrl", "console/admin-console/uploader-plus-admin");

}

Anyone can help me with this?

0 REPLIES 0