DSS-6552 Removes the consumer type from the list of ownerTypes displayed to the user

This commit is contained in:
Seyi Adebajo 2017-03-25 15:30:47 -07:00 committed by Mars Lan
parent 37097ea735
commit 86796b4a1d
2 changed files with 10 additions and 5 deletions

View File

@ -263,9 +263,14 @@ export default Route.extend({
controller.set("breadcrumbs", breadcrumbs);
}
// Get the list of ownerTypes from endpoint,
// then prevent display of the `consumer`
// insert on controller
Promise.resolve(getJSON(ownerTypeUrlRoot)).then(
({ status, ownerTypes }) =>
status === 'ok' && set(controller, 'ownerTypes', ownerTypes)
({status, ownerTypes = []}) => {
ownerTypes = ownerTypes.filter(ownerType => String(ownerType).toLowerCase() !== 'consumer');
status === 'ok' && set(controller, 'ownerTypes', ownerTypes);
}
);
Promise.resolve(getJSON(userSettingsUrlRoot)).then(({ status, user }) => {
@ -306,8 +311,7 @@ export default Route.extend({
}
return Promise.reject(new Error('Dataset columns request failed.'));
})
.catch(() =>
setProperties(controller, {
.catch(() => setProperties(controller, {
hasSchemas: false,
schemas: null
}));
@ -463,6 +467,7 @@ export default Route.extend({
})
.catch(() => set(controller, 'hasReferences', false));
// Retrieve the current owners of the dataset and store on the controller
Promise.resolve(getJSON(getDatasetOwnersUrl(id)))
.then(({ status, owners = [] }) => {
status === 'ok' && set(controller, 'owners', owners);

View File

@ -15,7 +15,7 @@
{{/if}}
</div>
</div>
<table class="table table-striped" style="word-break: break-all;">
<table class="table table-striped">
<thead>
<tr>
<th class="col-xs-2">User Name</th>