[FIX] Makes sur we always have a selectedGroup

This commit is contained in:
Joffrey JAFFEUX 2017-10-30 00:20:44 -07:00 committed by GitHub
parent 55095bc44e
commit 9406eee179
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -6,6 +6,11 @@ export default buildCategoryPanel('security', {
selectedGroup: null,
selectedPermission: null,
init() {
this._super();
this.set('selectedGroup', this.get('category.availableGroups.firstObject'));
},
actions: {
editPermissions() {
if (!this.get('category.is_special')) {
@ -20,6 +25,8 @@ export default buildCategoryPanel('security', {
permission: PermissionType.create({ id: parseInt(id) })
});
}
this.set('selectedGroup', this.get('category.availableGroups.firstObject'));
},
removePermission(permission) {