From c44d433aacce7a67f6569209d03426af53729242 Mon Sep 17 00:00:00 2001 From: Michael Dausmann Date: Sat, 29 Apr 2023 20:32:23 +1000 Subject: [PATCH] authorisation approach using trpc base procedures --- README.md | 3 +- pages/dashboard.vue | 2 +- server/trpc/routers/notes.router.ts | 4 +- server/trpc/trpc.ts | 75 +++++++---------------------- 4 files changed, 22 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index 8a0a0eb..186cb19 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,8 @@ Please don't hitch your wagon to this star just yet... I'm coding this in the op - [x] Plan features copied to Accounts upon successfull subscription - [x] Loose coupling between Plan and Account Features to allow ad-hoc account tweaks without creating custom plans - [x] Pricing page appropriately reacts to users with/without account and current plan. -- [ ] Plan features and Limits available in an object structure in Server methods and with method annotations or similar +- [x] User Access level available at the router layer as procedures allowing restriction of access based on user access +- [x] Account features available at the router layer as utility procedures allowing restriction of access based on account features ### Stripe (Payments) Integration - [x] Each plan is configured with Stripe Product ID so that multiple Stripe Prices can be created for each plan but subscriptions (via Webhook) will still activate the correct plan. diff --git a/pages/dashboard.vue b/pages/dashboard.vue index 2189530..12f7c17 100644 --- a/pages/dashboard.vue +++ b/pages/dashboard.vue @@ -40,7 +40,7 @@ class="px-4 py-2 text-white bg-blue-500 rounded-md hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-opacity-50"> Add -