Skip to content

Conversation

@Tschuppi81
Copy link
Contributor

@Tschuppi81 Tschuppi81 commented Jul 25, 2025

Directories: Publication settings for directory entries independent of role

Same as for submitted directory entries

TYPE: Feature
LINK: None

@codecov
Copy link

codecov bot commented Jul 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.19%. Comparing base (ec5e2ff) to head (6f179f0).
⚠️ Report is 24 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
Files with missing lines Coverage Δ
src/onegov/org/views/directory.py 80.44% <100.00%> (+0.44%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 150be3f...6f179f0. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Tschuppi81
Copy link
Contributor Author

Tschuppi81 commented Jul 25, 2025

Currently the behavior is not the same when submitting a directory entry vs creating/editing one as manager.

The submission does not depend on the role

    @property
    def extensions(self) -> tuple[str, ...]:
        extensions = ['coordinates', 'submitter', 'comment', 'publication']
        if self.enable_map == 'no':
            extensions.remove('coordinates')
        if not self.enable_publication:
            extensions.remove('publication')
        return tuple(extensions)

Added a test and removed the role check for managers.

@Tschuppi81 Tschuppi81 requested a review from Daverball November 5, 2025 01:45
Copy link
Member

@Daverball Daverball left a comment

Choose a reason for hiding this comment

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

I'm not convinced that this is worth changing. It does make sense to me that publication control is something that would usually be limited to admins (and potentially editors), unless it was explicitly enabled for everyone.

I'm a little worried that we're breaking a behavior our customers have been relying on, so I would prefer to drop this change, until we're actually sure it's harmless. Looking at the git blame of this line I'm seeing commit 2e32b23 explicitly added this check on purpose, so I'm assuming it's working as intended. I'm fine with widening this feature from admins to editors, but I don't think I'm fine with removing it altogether.

@Tschuppi81
Copy link
Contributor Author

I understand your arguments.

Background of my change was a sentry issue if I remember correctly, but I didn't note it down...

@Tschuppi81 Tschuppi81 closed this Nov 6, 2025
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.

3 participants