I'm currently working on a University project which is a website for managing a GameJam events occurring every 6 months. Our users will be in teams of 1 to 4 people and will be able to post about their game development live on our website during 48h. Last year, we used a simple wordpress blog and told our users not to post in other categories, but it's getting bigger this year and we want more restrictions.
I've made a plugin that handles custom post types but I'm wondering how could I integrate
Teams in the wordpress role system.
I have made a new role which is
gamejam_user. The custom post have these capabilities:
'capability_type' => 'teams_post', 'capabilities' => array( 'delete_others_posts' => 'delete_others_teams_posts', 'delete_post' => 'delete_teams_post', 'delete_posts' => 'delete_teams_posts', 'delete_private_posts' => 'delete_private_teams_posts', 'delete_published_posts' => 'delete_published_teams_posts', 'edit_others_posts' => 'edit_others_teams_posts', 'edit_post' => 'edit_teams_post', 'edit_posts' => 'edit_teams_posts', 'edit_private_posts' => 'edit_private_teams_posts', 'edit_published_posts' => 'edit_published_teams_posts', 'publish_posts' => 'publish_teams_posts', 'read_private_posts' => 'read_private_teams_posts', 'read_posts' => 'read_teams_posts' ),
But now, I'm just not sure how I'll integrate the team system as teams cannot edit other teams posts but users in a specific team can edit other posts in the same team.
The simple way could be to make the users create one account for their team and to use only this account, but it's not what we are looking for, our next event is in 1 week so this is probably what we will do, but since this is a 2events per year, I'll definitely need a way to accomplish this with the plugin.
Note: The team creation is backend only, Teams could have their own page with the loop of their own posts included at the bottom of their page (this could be done with a
hook for each
teams were custom post types but how to tell wordpress a custom post type is also a group of users? And how can we create a new capability that says you can edit others posts but only the ones from people in your team?).