This file is indexed.

/usr/share/maas/web/static/js/user_panel.js is in maas-region-controller-min 1.5.4+bzr2294-0ubuntu1.2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* Copyright 2012 Canonical Ltd.  This software is licensed under the
 * GNU Affero General Public License version 3 (see the file LICENSE).
 *
 * Widget to show user options.
 *
 * @module Y.maas.user_panel
 */

YUI.add('maas.user_panel', function(Y) {

Y.log('loading maas.user_panel');

var module = Y.namespace('maas.user_panel');

module._user_panel_singleton = null;

/**
 * Initialise a widget to display user options.
 *
 * @method createUserPanelWidget
 */
module.createUserPanelWidget = function(event) {
    Y.Base.mix(Y.Overlay, [Y.WidgetAutohide]);
    var cfg = {
        srcNode: '#user-options',
        align: {node:'#global-header',
                points: [Y.WidgetPositionAlign.TR, Y.WidgetPositionAlign.BR]},
        width: '150px',
        zIndex: 2,
        hideOn: [{eventName: 'clickoutside'}],
        visible: false,
        render: true
        };
    module._user_panel_singleton = new Y.Overlay(cfg);
    Y.one(cfg.srcNode).removeClass('hidden');
};

/**
 * Show a widget to display user options.
 *
 * @method showUserPanelWidget
 */
module.showUserPanelWidget = function(event) {
    // Cope with manual calls as well as event calls.
    if (Y.Lang.isValue(event)) {
        event.preventDefault();
    }
    module._user_panel_singleton.show();
};

}, '0.1', {'requires': ['overlay', 'base-build', 'widget-autohide']}
);