We've built all the xpdo objects and relations. But i'm stuck
managing the permissions. I've got two questions. You wrote:
You would need only one Resource which shows the currently filtered (by $_GET) Team and its Matchreviews (if I was understanding it correctly)
The permissions - system for this can be very simple.
You just need to check, if the user has the permission to edit or create Reviews and if the current Team is in the List of his Reviewerteams.
Permissions can be added to a menu item (in Actions > Update Menu) to deny access to migx url to manage a certain object.
Question 1 If the url is known and a user has not the particular permission, can this page be viewed and used?
Another view:
Now I'm thinking that is about managing reviews from the front-end of the website (not in the manager). However some objects, like MatchScores, needs to be managed in the backend. This would be done preferably by using migx CRUD tables. Now the only solution I understand would be this one:
- Create relation between the Match > Team > User
- In MIGXdb-settings for Matches add this relation in the where field. Then only the matches of this team are shown.
- For adding a new match, they can only choose from a combo, with teams in it they relate to.
However, there is no check at all if they match a team when an entry is added. So a smart developer could edit the values from the client side in the combo, and thereby add a match to another team.
Question 2: How to tackle this problem (in a secure way) with joins and select bindings?
I hope you/somebody can help me out. Thanks in advance!
Huub