TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: SaaS tier management (features/permissions)

3 点作者 Gns89将近 3 年前
Hi<p>I would like to know how you usually implement tiers in your SaaS applications and how do you handle the provisioning of features and permissions for users in your services?<p>Also, how you handle tier&#x2F;subscription upgrading or downgrading for your users as far as feature management?<p>Thanks in advance

2 条评论

sawirricardo将近 3 年前
you&#x27;re looking at Authorization (Not Authentication, which handles how to get the logged in user).<p>In Laravel, it&#x27;s known as Policy. So, based on the subscribed tier, you define the borders, which area of your saas are limited to &quot;pro&quot;, &quot;basic&quot;, etc.<p>Since Laravel is an MVC, usually, you&#x27;ll check this permissions in the controller. Check if user&#x27;s posts is more than his plan&#x27;s limit (say, 5). if he already has 5 posts, deny that request and put a nice error with message &quot;You&#x27;ve reached your limit. Please upgrade your plan&quot;.<p>or other alternative flash the session, and redirect the users to the billing page, with a message to upgrade his plan.<p>What do you think?
评论 #32019006 未加载
CodeSgt将近 3 年前
I suggest looking into authorization (not to be confused with authentication. Most auth (authentication) providers also provide a authorization framework you can integrate with.<p>The implementation details will vary wildly depending upon your exact needs.