mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 11:25:08 -02:30
Permissions
Fixed missing help text: https://trello.com/c/Lt3HCHkb/319-unknown-permissions-box-when-adding-user-team-permissions
This commit is contained in:
@@ -11,12 +11,14 @@
|
|||||||
|
|
||||||
angular.module('AccessHelper', ['RestServices', 'Utilities'])
|
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) {
|
return function (params) {
|
||||||
// set PermissionAddAllowed to true or false based on user access. admins and org admins are granted
|
// set PermissionAddAllowed to true or false based on user access. admins and org admins are granted
|
||||||
// accesss.
|
// accesss.
|
||||||
var me = $rootScope.current_user,
|
var scope = params.scope, me;
|
||||||
scope = params.scope;
|
|
||||||
|
// 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) {
|
if (me.is_superuser) {
|
||||||
scope.PermissionAddAllowed = true;
|
scope.PermissionAddAllowed = true;
|
||||||
|
|||||||
@@ -45,4 +45,4 @@ angular.module('PermissionsHelper', [])
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|||||||
@@ -693,7 +693,7 @@ angular.module('GeneratorHelpers', [])
|
|||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
html += "<div id=\"accordion" + idx + "\" class=\"panel-collapse collapse in\">\n";
|
html += "<div id=\"accordion" + idx + "\" class=\"panel-collapse collapse in\">\n";
|
||||||
html += "<div class=\"panel-body\" ";
|
html += "<div class=\"panel-body\" ";
|
||||||
html += (bind) ? "ng-bind-html-unsafe=\"" + bind + "\" " : "";
|
html += (bind) ? "ng-bind-html=\"" + bind + "\" " : "";
|
||||||
html += ">\n";
|
html += ">\n";
|
||||||
html += (!bind) ? content : "";
|
html += (!bind) ? content : "";
|
||||||
html += "</div>\n";
|
html += "</div>\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user