Merge pull request #607 from Kamidu/cloud-3.1.0

Cloud 3.1.0
revert-70aa11f8
Kamidu Sachith Punchihewa 8 years ago committed by GitHub
commit 7ad808f2fb

@ -463,7 +463,13 @@ var userModule = function () {
publicMethods.isAuthorized = function (permission) { publicMethods.isAuthorized = function (permission) {
var carbon = require("carbon"); var carbon = require("carbon");
var carbonServer = application.get("carbonServer"); var carbonServer = application.get("carbonServer");
var carbonUser = session.get(constants.USER_SESSION_KEY); var carbonUser;
try {
carbonUser = session.get(constants.USER_SESSION_KEY);
} catch (e) {
log.error("User object was not found in the session");
carbonUser = null;
}
var utility = require('/app/modules/utility.js').utility; var utility = require('/app/modules/utility.js').utility;
if (!carbonUser) { if (!carbonUser) {
log.error("User object was not found in the session"); log.error("User object was not found in the session");

@ -78,7 +78,7 @@
</a> </a>
{{/if}} {{/if}}
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->
{{#unless isCloud}}
<a href="{{@app.context}}/group/add"> <a href="{{@app.context}}/group/add">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i> <i class="fw fw-circle-outline fw-stack-2x"></i>
@ -86,7 +86,7 @@
</span> </span>
Add Add
</a> </a>
{{/unless}}
</span> </span>
</div> </div>
</div> </div>
@ -144,7 +144,7 @@
</a> </a>
{{/if}} {{/if}}
<!--suppress HtmlUnknownTarget --> <!--suppress HtmlUnknownTarget -->
{{#unless isCloud}}
<a href="{{@app.context}}/policy/add"> <a href="{{@app.context}}/policy/add">
<span class="fw-stack"> <span class="fw-stack">
<i class="fw fw-circle-outline fw-stack-2x"></i> <i class="fw fw-circle-outline fw-stack-2x"></i>
@ -152,7 +152,7 @@
</span> </span>
Add Add
</a> </a>
{{/unless}}
</span> </span>
</div> </div>
</div> </div>

@ -179,7 +179,7 @@ function loadRoles() {
'<span class="hidden-xs hidden-on-grid-view">Edit Permission</span>' + '<span class="hidden-xs hidden-on-grid-view">Edit Permission</span>' +
'</a>'; '</a>';
car removeLink = '<a data-role="' + data.name + '" ' + var removeLink = '<a data-role="' + data.name + '" ' +
'data-click-event="remove-form" ' + 'data-click-event="remove-form" ' +
'class="btn padding-reduce-on-grid-view remove-role-link">' + 'class="btn padding-reduce-on-grid-view remove-role-link">' +
'<span class="fw-stack">' + '<span class="fw-stack">' +

Loading…
Cancel
Save