mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Add/remove correctly
This commit is contained in:
@@ -54,7 +54,15 @@
|
||||
}
|
||||
const parsedKey = this.parseOutputPermission(key);
|
||||
const permissionString = this.buildPermission(parsedKey, permission.role);
|
||||
this.rawPermissions[index] = permissionString;
|
||||
if (permission[key]) {
|
||||
if (!this.rawPermissions.includes(permissionString)) {
|
||||
this.rawPermissions.push(permissionString);
|
||||
}
|
||||
} else {
|
||||
this.rawPermissions = this.rawPermissions.filter(p => {
|
||||
return !p.includes(permissionString);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user