用户类型/角色 - 开发人员
您有使用您的网站/服务的常规用户,他们可以登录到 mainsite1,然后您有开发人员,无法登录到 mainsite1,但可以登录到developercenter1。您是否:
1)将每种类型的用户存储到1个大的USER表中,然后分配不同的角色?
或者
2)仅为开发人员创建一个完全独立的表,因为他们都是使用两个不同站点的完全不同的用户?
You have regular users that use your website/services, they can login to mainsite1, then you have developers, that can not login to mainsite1, but can login to developercenter1. Do you:
1) Store every type of users into 1 large USER table then assign different roles?
or
2) Create a completely separate table just for developers, since they are both completely different users using two different sites?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
集中登录,然后添加角色,然后通过相关表链接每个组的特殊属性可能是合适的。
所以,是的,我会分配角色,并保持登录集中(这意味着它可以是一个代码库来进行登录,这很好)。
It's probably appropriate to centralise the logins, then add roles, and then link special properties for each group through a related table.
So yes, I'd assign roles, and keep login centralised (this means it can be one codebase to do the login, which is good).
id 使用基于角色的系统,因为拥有 2 个相似的数据结构可能是一个坏主意 - 如果您更改一个而不更改另一个,那么您可能会遇到问题
id use a roles based system as having 2 similar data structures may be a bad idea going forward - if you change one and not the other then you may have issues