Clear apids on disable and only add me if user list is empty

This commit is contained in:
Westly Wright 2018-07-05 11:36:53 -07:00
parent 51bfe11cf0
commit c65c329731
No known key found for this signature in database
GPG Key ID: 4FAB3D8673DC54A3
2 changed files with 3 additions and 2 deletions

View File

@ -104,7 +104,7 @@ export default Component.extend({
}
});
if ( !found ) {
if ( !found && !allowedPrincipals.length) {
allowedPrincipals.pushObject(get(this, 'access.principal.id'));
}
}

View File

@ -70,7 +70,8 @@ export default Mixin.create({
setProperties(model, {
enabled: false,
accessMode: 'unrestricted'
accessMode: 'unrestricted',
allowedPrincipalIds: []
});
model.doAction('disable').then(() => {