Fix for Jira issue: EMM-1635

revert-70aa11f8
kamidu 8 years ago
parent 174555b387
commit 1a9ca2d59e

@ -72,7 +72,7 @@
<button class="wr-btn" onclick="window.location.href='{{@app.context}}/roles'"> <button class="wr-btn" onclick="window.location.href='{{@app.context}}/roles'">
View Role List View Role List
</button> </button>
<a href="{{@app.context}}/roles/add-role" class="cu-btn-inner"> <a href="{{@app.context}}/role/add" class="cu-btn-inner">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-ring fw-stack-2x"></i> <i class="fw fw-ring fw-stack-2x"></i>
<i class="fw fw-add fw-stack-1x"></i> <i class="fw fw-add fw-stack-1x"></i>

@ -15,8 +15,28 @@
specific language governing permissions and limitations specific language governing permissions and limitations
under the License. under the License.
}} }}
{{#zone "userMenu"}}
{{#zone "userMenu-items"}} <ul class="nav navbar-right float-remove-xs text-center-xs">
<li class="visible-inline-block">
<a href="#" class="dropdown" data-toggle="dropdown">
<span class="icon fw-stack fw-lg">
<i class="fw fw-circle fw-stack-2x"></i>
<i class="fw fw-user fw-stack-1x fw-inverse"></i>
</span>
<span class="hidden-xs add-padding-left-1x">
{{#if isSuperTenant }}
{{@user.username}}<span class="caret"></span>
{{else}}
{{@user.username}}@{{@user.domain}}<span class="caret"></span>
{{/if}}
</span>
</a>
<ul class="dropdown-menu dropdown-menu-right float-remove-xs position-static-xs text-center-xs remove-margin-xs slideInDown"
role="menu">
<li class="dropdown-header visible-xs">
{{@user.username}}<span class="caret"></span>
</li>
<li class="divider visible-xs"></li>
<li> <li>
<a href="javascript:void(0)" id="change-password">Change password</a> <a href="javascript:void(0)" id="change-password">Change password</a>
</li> </li>
@ -39,7 +59,8 @@
</span> </span>
&nbsp;&nbsp;Change password &nbsp;&nbsp;Change password
</h4> </h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i
class="fw fw-cancel"></i></button>
</div> </div>
<hr> <hr>
<div class="modal-body add-margin-top-2x add-margin-bottom-2x"> <div class="modal-body add-margin-top-2x add-margin-bottom-2x">
@ -85,7 +106,8 @@
</span> </span>
&nbsp;&nbsp;Password has been successfully updated &nbsp;&nbsp;Password has been successfully updated
</h4> </h4>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><i class="fw fw-cancel"></i></button> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><i
class="fw fw-cancel"></i></button>
</div> </div>
<hr> <hr>
<div class="modal-body add-margin-top-2x add-margin-bottom-2x"> <div class="modal-body add-margin-top-2x add-margin-bottom-2x">
@ -99,7 +121,11 @@
</div> </div>
</div> </div>
</div> </div>
</ul>
</li>
</ul>
{{/zone}} {{/zone}}
{{#zone "bottomJs"}} {{#zone "bottomJs"}}
{{js "/js/user-menu.js"}} {{js "/js/user-menu.js"}}
{{/zone}} {{/zone}}

@ -16,7 +16,15 @@
* under the License. * under the License.
*/ */
function onRequest() { function onRequest(context) {
var constants = require("/app/modules/constants.js"); var constants = require("/app/modules/constants.js");
return session.get(constants["USER_SESSION_KEY"]); var user = context.user;
var isSuperTenant = false;
if (user.tenantId == -1234){
isSuperTenant = true;
}
var viewModal = {};
viewModal.isSuperTenant = isSuperTenant;
viewModal.USER_SESSION_KEY = session.get(constants["USER_SESSION_KEY"]);
return viewModal;
} }

Loading…
Cancel
Save