add back handler for when we arent using updated ownership ux
@@ -15,7 +15,8 @@ import {
minRequiredConfirmedOwners,
validConfirmedOwners,
isRequiredMinOwnersNotConfirmed,
- isConfirmedOwner
+ isConfirmedOwner,
+ isSystemGeneratedOwner
} from 'wherehows-web/constants/datasets/owner';
import { OwnerSource, OwnerType } from 'wherehows-web/utils/api/datasets/owners';
import Notifications, { NotificationEvent } from 'wherehows-web/services/notifications';
@@ -173,9 +174,12 @@ export default class DatasetAuthors extends Component {
* @memberof DatasetAuthors
*/
systemGeneratedOwners: ComputedProperty<Array<IOwner>> = computed('suggestedOwners', function() {
+ const showOwnership = get(this, 'showOwnership');
// Creates a copy of suggested owners since using it directly seems to invoke a "modified twice in the
// same render" error
- return (get(this, 'suggestedOwners') || []).slice(0);
+ return showOwnership === 'show'
+ ? (get(this, 'suggestedOwners') || []).slice(0)
+ : get(this, 'owners').filter(isSystemGeneratedOwner);
});
/**
