mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 14:09:28 -02:30
remove admin and member roles from team->organizations role assignment options
This commit is contained in:
@@ -77,8 +77,17 @@ function(scope, $state, i18n, CreateSelect2, Rest, $q, Wait, ProcessErrors) {
|
|||||||
|
|
||||||
// aggregate name/descriptions for each available role, based on resource type
|
// aggregate name/descriptions for each available role, based on resource type
|
||||||
// reasoning:
|
// reasoning:
|
||||||
function aggregateKey(item, type){
|
function aggregateKey(item, type) {
|
||||||
_.merge(scope.keys[type], item.summary_fields.object_roles);
|
const ownerType = _.get(scope, ['owner', 'type']);
|
||||||
|
const { object_roles } = item.summary_fields;
|
||||||
|
|
||||||
|
if (ownerType === 'team' && type === 'organizations') {
|
||||||
|
// some organization object_roles aren't allowed for teams
|
||||||
|
delete object_roles.admin_role;
|
||||||
|
delete object_roles.member_role;
|
||||||
|
}
|
||||||
|
|
||||||
|
_.merge(scope.keys[type], object_roles);
|
||||||
}
|
}
|
||||||
|
|
||||||
scope.closeModal = function() {
|
scope.closeModal = function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user