Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@tomako
Copy link
Contributor

@tomako tomako commented Oct 18, 2025

This PR is about streamlining ACL management for ProtectionMixin classes (Attachment, AttachmentFolder, MenuEntry).

Why is it needed?
Despite the management methods exist (update_principal, remove_principal), they are used only in tests and not in production code. The principals are updated using the usual populate-by-form methods resulting signals.acl.entry_changed is not called, ACL changes are not logged in user log.

Solution
A new function update_read_permissions is added to indico.core.permissions module. Its signature intentionally the same as for update_permissions which operates on ProtectionManagerMixin permissions. Seemingly these functions would be worth further refactoring but I didn't want to go too far in this PR. Please let me know if you think otherwise.

@tomako tomako force-pushed the update_outdated_acl_management branch 2 times, most recently from 785aa64 to 923de7d Compare November 10, 2025 17:04
@tomako tomako force-pushed the update_outdated_acl_management branch 2 times, most recently from 180130c to fa98650 Compare November 26, 2025 12:22
@ThiefMaster ThiefMaster force-pushed the update_outdated_acl_management branch from fa98650 to 42a6b80 Compare December 8, 2025 17:19
@ThiefMaster ThiefMaster added this to the v3.3 milestone Dec 8, 2025
@ThiefMaster ThiefMaster enabled auto-merge (squash) December 8, 2025 17:20
@ThiefMaster ThiefMaster merged commit f3680a6 into indico:master Dec 8, 2025
10 checks passed
@ThiefMaster ThiefMaster deleted the update_outdated_acl_management branch December 8, 2025 17:22
if self.entry.is_page and self.entry.page.html != form.html.data:
changes['html'] = (self.entry.page.html, form.html.data)
self.entry.page.html = form.html.data
update_read_permissions(self.entry, form)
Copy link
Member

Choose a reason for hiding this comment

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

This broke editing builtin entries since these do not have an ACL. Fixed in 2a4c888

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

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.