@dnax/core 0.3.3 → 0.3.4
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/app/hono.ts +21 -12
- package/package.json +1 -1
package/app/hono.ts
CHANGED
|
@@ -142,7 +142,8 @@ function HonoInstance(): typeof app {
|
|
|
142
142
|
let colAccess =
|
|
143
143
|
col?.access?.hasOwnProperty(action) ||
|
|
144
144
|
session.get()?.access?.hasOwnProperty(action) ||
|
|
145
|
-
|
|
145
|
+
session.get()?.access?.hasOwnProperty("allAction");
|
|
146
|
+
null;
|
|
146
147
|
let nextLifecyle: any = false;
|
|
147
148
|
|
|
148
149
|
// Middleware for apis
|
|
@@ -192,17 +193,25 @@ function HonoInstance(): typeof app {
|
|
|
192
193
|
});
|
|
193
194
|
} else {
|
|
194
195
|
if (col && action && colAccess) {
|
|
195
|
-
let basicNextAccess =
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
196
|
+
let basicNextAccess = false;
|
|
197
|
+
|
|
198
|
+
if (session.get().access.hasOwnProperty(action)) {
|
|
199
|
+
basicNextAccess = session.get().access[action];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (session.get().access.hasOwnProperty("allAction")) {
|
|
203
|
+
basicNextAccess = session.get().access["allAction"];
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
nextLifecyle = basicNextAccess
|
|
207
|
+
? basicNextAccess
|
|
208
|
+
: await col?.access[action]({
|
|
209
|
+
session: sessionStorage(),
|
|
210
|
+
action: action,
|
|
211
|
+
c: c,
|
|
212
|
+
isAuth: c.var?._v?.isAuth || false,
|
|
213
|
+
rest: new useRest({ tenant_id: tenant_id }),
|
|
214
|
+
});
|
|
206
215
|
}
|
|
207
216
|
}
|
|
208
217
|
|