Skip to content

Rename closed category/thread permission checks #1980

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

metalerk
Copy link

Fixes #1955

Misago permission checks:

check_post_in_closed_category_permission
check_post_in_closed_thread_permission

Had been renamed to:

check_locked_category_permission
check_locked_thread_permission

Including a couple file names.

permissions check_post_in_closed_category_permission and
check_post_in_closed_thread_permission have been renamed
to check_locked_category_permission and check_locked_thread_permission respectively
@rafalp rafalp added this to the Next feature release milestone Aug 14, 2025
@rafalp rafalp added area: docs area: backend This issue involves Python, Django or dependency (eg. database) labels Aug 14, 2025
Copy link
Owner

@rafalp rafalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left some nits

@@ -28,11 +28,11 @@
from .check_edit_thread_poll_permission import check_edit_thread_poll_permission_hook
from .check_edit_thread_post_permission import check_edit_thread_post_permission_hook
from .check_open_thread_poll_permission import check_open_thread_poll_permission_hook
from .check_post_in_closed_category_permission import (
check_post_in_closed_category_permission_hook,
from .check_locked_category_permission import (
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please reorder imports

@@ -103,8 +103,8 @@
"check_edit_thread_poll_permission_hook",
"check_edit_thread_post_permission_hook",
"check_open_thread_poll_permission_hook",
"check_post_in_closed_category_permission_hook",
"check_post_in_closed_thread_permission_hook",
"check_locked_category_permission_hook",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please order this list alphabetically

@@ -85,8 +85,8 @@ Hooks instances are importable from the following Python modules:
- [`check_edit_thread_poll_permission_hook`](./check-edit-thread-poll-permission-hook.md)
- [`check_edit_thread_post_permission_hook`](./check-edit-thread-post-permission-hook.md)
- [`check_open_thread_poll_permission_hook`](./check-open-thread-poll-permission-hook.md)
- [`check_post_in_closed_category_permission_hook`](./check-post-in-closed-category-permission-hook.md)
- [`check_post_in_closed_thread_permission_hook`](./check-post-in-closed-thread-permission-hook.md)
- [`check_locked_category_permission_hook`](./check-post-in-closed-category-permission-hook.md)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run python generate_dev_docs.py in main directory instead of manually updating hooks reference.

@rafalp rafalp changed the title Rename permission checks Rename closed category/thread permission checks Aug 14, 2025
@rafalp
Copy link
Owner

rafalp commented Aug 14, 2025

Build is failing, please format code with black after your changes

@coveralls
Copy link

coveralls commented Aug 16, 2025

Coverage Status

coverage: 96.94% (-0.01%) from 96.951%
when pulling 0a8b1d6 on metalerk:rename-check-post-in-closed-permission-checks
into 619037a on rafalp:main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: backend This issue involves Python, Django or dependency (eg. database) area: docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rename check_post_in_closed_ permission checks
3 participants