add payment settting
CI/CD / Vet, test, build (push) Has been cancelled
CI/CD / Docker image (push) Has been cancelled
CI/CD / Deploy binary to server (push) Has been cancelled

This commit is contained in:
guwandyk committed 2026-09-19 02:12:59 +05:00
1 parent 0971158e98
commit b8455625b5
21 files changed
+1760 -12

No files matched your search

+4
View File
@@ -622,6 +622,9 @@ func adminPathPermission(method, path string) string {
case matchesPrefix(rest, []string{"/currencies"}):
return viewOrManage(method, "currencies")
case matchesPrefix(rest, []string{"/payment-settings"}):
return viewOrManage(method, "payment-settings")
}
return ""
@@ -675,4 +678,5 @@ var operatorGetPrefixes = []string{
"/provinces",
"/branches",
"/currencies",
"/payment-settings",
}
@@ -400,6 +400,8 @@ func TestAdminPathPermission(t *testing.T) {
{http.MethodPost, "/api/admin/backups", "backups.manage"},
{http.MethodGet, "/api/admin/currencies", "currencies.view"},
{http.MethodPost, "/api/admin/currencies", "currencies.manage"},
{http.MethodGet, "/api/admin/payment-settings", "payment-settings.view"},
{http.MethodPut, "/api/admin/payment-settings", "payment-settings.manage"},
{http.MethodGet, "/api/admin/dashboard", ""},
{http.MethodGet, "/api/admin/profile", ""},
{http.MethodPost, "/api/admin/file", ""},