Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Books example Documentation #22

Closed
tpharaoh opened this issue May 25, 2016 · 4 comments
Closed

Books example Documentation #22

tpharaoh opened this issue May 25, 2016 · 4 comments

Comments

@tpharaoh
Copy link

In the books example, could you add how to limit it to the team.

@mlantz
Copy link
Member

mlantz commented May 25, 2016

As I see it, there are many ways to limit it to the team. You could add a team_id to the books and then bind it to the team and say that any member of the team has access. Or go based on user memberships etc. I would prefer to let developers make those decisions based on their use case. But if it were me with a clean app I would add a team_id column which would let you limit the books to team members.

@mlantz mlantz closed this as completed May 25, 2016
@tpharaoh
Copy link
Author

tpharaoh commented May 25, 2016

So, I see your point.
User can belong to many teams. I guess I can block team page to a "team leader", and create a new role for team member.
Now, I guess I need to add a scope of sorts. Perhaps if user is not admin, then select Books from any of his teams. Do you see a more logical way for me in using your tool?

@mlantz
Copy link
Member

mlantz commented May 26, 2016

Laracogs is intended to be a simple starter kit for various parts of an app along with a powerful CRUD, and some magical Crypto tools. In terms of determining optimal ways of handling the business logic in your app. Thats up to you. You can technically create as many roles as you want. But it may be beneficial to develop your own team roles component, which could dictate those control levels :)

@tpharaoh
Copy link
Author

Posted back on reddit... I figured the solution in my case was a scope. Since my goal is to have 1 team per user (much like a company/employee relationship), this scope worked perfectly.

My next task is to figure out how only team owner gets billed, and members don't...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants