Merge pull request #607 from Kamidu/cloud-3.1.0

Cloud 3.1.0
4.x.x
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>
@ -197,4 +197,4 @@
</h1> </h1>
{{/if}} {{/if}}
</div> </div>
{{/zone}} {{/zone}}

@ -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">' +
@ -189,7 +189,7 @@ function loadRoles() {
'<span class="hidden-xs hidden-on-grid-view">Remove</span>' + '<span class="hidden-xs hidden-on-grid-view">Remove</span>' +
'</a>'; '</a>';
if (!isCloud){ if (!isCloud) {
innerhtml = editLink + editPermissionLink + removeLink; innerhtml = editLink + editPermissionLink + removeLink;
} }
return innerhtml; return innerhtml;

Loading…
Cancel
Save