GeriLife / companionship

Promoting companionship and well-being for everyone.
European Union Public License 1.2
7 stars 18 forks source link

Limit maximum number of Caring Circles to 1 per user (default) #90

Closed brylie closed 1 year ago

brylie commented 1 year ago

In preparation for a tiered service offering, we will limit the maximum number of Caring Circles to 1 per user.

Acceptance criteria

werberger commented 1 year ago

Can I be assigned this one @brylie ?

werberger commented 1 year ago

Given I'm fairly inexperienced @brylie, would you prefer I discuss my proposed solution or simply create my PR?

brylie commented 1 year ago

@werberger, good question. I omitted the "acceptance criteria" from the issue description.

However, given the project plans ti develop REST API, would you like to start on the user login/logout API views, using Django REST Framework instead of this issue?

brylie commented 1 year ago

I'll close this issue for now. The idea was to find a sustainable business model for this project by introducing artificial scarcity. It will be more natural perhaps to ask for voluntary financial support or to offer a premium feature that involves actual scarcity, such as significant compute time/storage.

Granted, development time is limited, so we will hopefully figure out sustainable revenue soon.

werberger commented 1 year ago

Your added Acceptance Criteria clarifies that you were only talking about creating a new circle not joining. However, I seems to me like that's already the case as commented in circles\views.py

Am I misunderstanding something?

    def test_func(self) -> bool:
        """
        For now, users can only create at most one Circle (a.k.a. care circle)

        The limit is intended to reduce the liklihood of abuse while eventually
        encouraging users to become supporters when that tier becomes available.

        Here, we check whether a user is already a care circle organizer. If so,
        they cannot add a new Circle (care circle).
        """

        return not self.request.user.is_care_circle_organizer