@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.
Files changed (2) hide show
  1. package/edgeFirebase.ts +8 -0
  2. 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({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgedev/firebase",
3
- "version": "2.1.77",
3
+ "version": "2.1.78",
4
4
  "description": "Vue 3 / Nuxt 3 Plugin or Nuxt 3 plugin for firebase authentication and firestore.",
5
5
  "main": "index.ts",
6
6
  "scripts": {