Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_subscriber perms should be managed more wisely #29

Open
anibalpacheco opened this issue Dec 2, 2021 · 2 comments
Open

is_subscriber perms should be managed more wisely #29

anibalpacheco opened this issue Dec 2, 2021 · 2 comments

Comments

@anibalpacheco
Copy link
Contributor

There's no warning to the user to add or modify a permission when a publication is added or modified its slug, the permission is needed to check if a user is subscribed to the publication.

This way of checking is complicated to maintain, because to fix it, we have to modify the Publication save method or make triggers to handle the permissions involved with the addition or modification that was made.

We have to think another easier way to manage this subscriber permission related to a publication, a group related to the publication can be an option, this approach is already used someway in another thedaily model.

@anibalpacheco
Copy link
Contributor Author

anibalpacheco commented Mar 2, 2024

status: doing
A post save action was implemented now in a branch that I did not pushed yet, to continue this task (and maybe complete it) I will need to implement this TODO: "when a publication slug is changed, the command update_article_urls should be executed, (try to alert this to the staff user that has made the change, somehow)."

this last "try to alert" is under development now, but it will not be an alert, it will be done directly using a background task with celery (I'm also changing the async task management from background tasks to celery that is more robust, popular and stable)

Note for the "permissions" approach: if we migrate it to the "plan_id" approach (that we use now in one of our private deployment), we need that the async task "on change" change the slugs inside the json content of "plan_id". A definitive solution can be to use the Subscription model, improving it to hold the same information that the "plan_id" has, but using a non slug-dependant way.

Related feature to also implement: A new "system check" to check that the default pub slug in settings "exists" (matches with one of the Publications in the DB).

@anibalpacheco
Copy link
Contributor Author

status: doing, subtasks left here are:

  • the main purpose of this issue, improve the is_subscriber permission management
  • the new system check described at the end of the previous comment

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

No branches or pull requests

1 participant