"Can't smash her if she's not good at 30 Seconds
How's my kid gonna be if the mother clearly missed life's early lessons?" ~ @TouchlineTruth
πππ
"Only Admins can do this."
That check is easy to add to an API.
Then the app grows.
Now you have Admins, Managers, Editors, Support Agents, and custom access rules for a few users.
Soon, your code is full of questions like:
β Is this user an Admin?
β Or a Manager?
β Or a Manager with one extra rule?
β Do we need a new role for this one action?
This is where role checks start to break down.
A better approach is to think in permissions:
β Users have roles
β Roles contain permissions
β Endpoints require a permission
For example, an endpoint does not need to know that a user is a Manager.
It only needs to know whether they can update users or export reports.
This gives you access rules that are easier to read, change, and test.
And you can add new permissions without spreading new role checks across your API.
I break down how to build this in ASPNET Core, using permission-based policies, claims, and clean endpoint rules.
Worth reading before your next "just add an Admin check" turns into a much bigger problem: https://t.co/Pf3WvxB6vX
@SoulFairy3 If this is mean't to benefit the masses, then the bank should say "no interest to mortgage for 2 years"
But their target market will fall for their scam π€·ββοΈ