mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
Fix raw permission removal
This commit is contained in:
parent
a5e6c04cb0
commit
3e17d9398b
1 changed files with 3 additions and 3 deletions
|
|
@ -39,8 +39,6 @@
|
|||
if (update) this.rawPermissions.push(`update(${role})`);
|
||||
if (xdelete) this.rawPermissions.push(`delete(${role})`);
|
||||
|
||||
console.log(this.rawPermissions);
|
||||
|
||||
this.permissions.push({
|
||||
role,
|
||||
read,
|
||||
|
|
@ -53,7 +51,9 @@
|
|||
},
|
||||
removePermission(index) {
|
||||
let row = this.permissions.splice(index, 1);
|
||||
this.rawPermissions = this.rawPermissions.filter(p => !p.includes(row.role));
|
||||
if (row.length === 1) {
|
||||
this.rawPermissions = this.rawPermissions.filter(p => !p.includes(row[0].role));
|
||||
}
|
||||
}
|
||||
}));
|
||||
Alpine.data('permissionsRow', () => ({
|
||||
|
|
|
|||
Loading…
Reference in a new issue