Skip to content

Commit

Permalink
feat: request admin check rule
Browse files Browse the repository at this point in the history
  • Loading branch information
yoojinko committed Feb 21, 2024
1 parent 95941aa commit 192e3d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ export const defaultAppRules = (appName: string): { [type: string]: { ref: strin
value: {
".rule": {
write:
"auth.addr === $userAddress && " +
"util.isAppAdmin(`" + `${appName}` + "`, auth.addr, getValue) === true || " +
"(auth.addr === $userAddress && " +
"(getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`) === 0 || " +
"(getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`)))"
"(getValue(`/apps/" + `${appName}` + "/balance/` + $userAddress + `/balance`) >= getValue(`/apps/" + `${appName}` + "/billingConfig/minCost`))))",
},
},
},
Expand Down

0 comments on commit 192e3d7

Please sign in to comment.