1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Permissions

Fixed missing help text: https://trello.com/c/Lt3HCHkb/319-unknown-permissions-box-when-adding-user-team-permissions
This commit is contained in:
Chris Houseknecht 2014-08-15 16:57:41 -04:00
parent ceeea4d527
commit e25778d0ed
3 changed files with 7 additions and 5 deletions

View File

@ -11,12 +11,14 @@
angular.module('AccessHelper', ['RestServices', 'Utilities'])
.factory('CheckAccess', ['$rootScope', 'Alert', 'Rest', 'GetBasePath', 'ProcessErrors', function ($rootScope, Alert, Rest, GetBasePath, ProcessErrors) {
.factory('CheckAccess', ['$rootScope', 'Alert', 'Rest', 'GetBasePath', 'ProcessErrors', '$cookieStore', function ($rootScope, Alert, Rest, GetBasePath, ProcessErrors, $cookieStore) {
return function (params) {
// set PermissionAddAllowed to true or false based on user access. admins and org admins are granted
// accesss.
var me = $rootScope.current_user,
scope = params.scope;
var scope = params.scope, me;
// uer may have refreshed the browser, in which case retrieve current user info from session cookie
me = ($rootScope.current_user) ? $rootScope.current_user : $cookieStore.get('current_user');
if (me.is_superuser) {
scope.PermissionAddAllowed = true;

View File

@ -45,4 +45,4 @@ angular.module('PermissionsHelper', [])
}
};
}
]);
]);

View File

@ -693,7 +693,7 @@ angular.module('GeneratorHelpers', [])
html += "</div>\n";
html += "<div id=\"accordion" + idx + "\" class=\"panel-collapse collapse in\">\n";
html += "<div class=\"panel-body\" ";
html += (bind) ? "ng-bind-html-unsafe=\"" + bind + "\" " : "";
html += (bind) ? "ng-bind-html=\"" + bind + "\" " : "";
html += ">\n";
html += (!bind) ? content : "";
html += "</div>\n";