admins, users with team:admin for the team, and users with org:admin,
        team's organization have full access to teams. Users who are a member
        of the team, or are a member of the team's organization, have read
        access to the team.

def object_permission_set(self):
        '''
        admins, users with team:admin for the team, and users with org:admin,
        team's organization have full access to teams. Users who are a member
        of the team, or are a member of the team's organization, have read
        access to the team.
        '''
        return Or(
            AllowAdmin,
            AllowObjectPermission('team:admin'),
            AllowObjectPermission('org:admin', lambda t: t.organization_id),
            And(
                AllowOnlySafeHttpMethod,
                Or(
                    ObjAttrTrue(
                        lambda r, t: t.users.filter(pk=r.user.pk).exists()),
                    ObjAttrTrue(
                        lambda r, t: t.organization.users.filter(
                            pk=r.user.pk).exists())
                )
            )
        )