Hide organizations tab when adding team permissions. Filter credentials based on org when adding team permissions.

This commit is contained in:
Michael Abashian
2017-07-12 15:33:45 -04:00
parent c5d1ff1791
commit beeb9b8c01
2 changed files with 9 additions and 3 deletions

View File

@@ -65,6 +65,7 @@
<div class="Form-tab" <div class="Form-tab"
ng-click="selectTab('organizations')" ng-click="selectTab('organizations')"
ng-class="{'is-selected': tab.organizations}" ng-class="{'is-selected': tab.organizations}"
ng-hide="owner.type === 'team'"
translate> translate>
Organizations Organizations
</div> </div>

View File

@@ -313,9 +313,14 @@ function($injector, $stateExtender, $log, i18n) {
return qs.search(path, $stateParams[`${list.iterator}_search`]); return qs.search(path, $stateParams[`${list.iterator}_search`]);
} }
], ],
credentialsDataset: ['CredentialList', 'QuerySet', '$stateParams', 'GetBasePath', credentialsDataset: ['CredentialList', 'QuerySet', '$stateParams', 'GetBasePath', 'resourceData',
function(list, qs, $stateParams, GetBasePath) { function(list, qs, $stateParams, GetBasePath, resourceData) {
let path = GetBasePath(list.basePath) || GetBasePath(list.name); let path = GetBasePath(list.basePath) || GetBasePath(list.name);
if(resourceData.data.type === "team") {
$stateParams[`${list.iterator}_search`].organization = resourceData.data.organization;
}
return qs.search(path, $stateParams[`${list.iterator}_search`]); return qs.search(path, $stateParams[`${list.iterator}_search`]);
} }
], ],