@edgedev/firebase 2.1.77 → 2.1.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/edgeFirebase.ts +8 -0
- package/package.json +1 -1
package/edgeFirebase.ts
CHANGED
|
@@ -2135,6 +2135,14 @@ export const EdgeFirebase = class {
|
|
|
2135
2135
|
cloneItem.doc_created_at = currentTime;
|
|
2136
2136
|
}
|
|
2137
2137
|
if (Object.prototype.hasOwnProperty.call(cloneItem, "docId")) {
|
|
2138
|
+
const canWriteCollection = await this.permissionCheck("write", collectionPath);
|
|
2139
|
+
if (!canWriteCollection) {
|
|
2140
|
+
return this.sendResponse({
|
|
2141
|
+
success: false,
|
|
2142
|
+
message: `You do not have permission to write to "${collectionPath}"`,
|
|
2143
|
+
meta: {}
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
2138
2146
|
const canWrite = await this.permissionCheck("write", collectionPath + "/" + cloneItem.docId);
|
|
2139
2147
|
if (!canWrite) {
|
|
2140
2148
|
return this.sendResponse({
|