Skip to content

Conversation

@Saksham-Sirohi
Copy link
Contributor

fixes #651 to enext

Screenshot 2025-10-02 at 12 20 23 AM

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

The pull request #890 has too many files changed.

The GitHub API will only let us fetch up to 300 changed files, and this pull request has 3968.

@Saksham-Sirohi Saksham-Sirohi changed the base branch from development to enext October 1, 2025 18:55
@mariobehling
Copy link
Member

mariobehling commented Oct 2, 2025

So, as we proceed I think we need to have this in a bit more advanced way. In the admin section of the platform (e.g. https://wikimedia.eventyay.com/tickets/control/admin/global/settings/) there should be a section "Organizer Creation" with the following tick boxes.

Organizer Creation

By default system admins can always create organizer. Additionally the following roles are permitted to create organizers:

  • All registered users can create organizers.
  • All accounts with with payment information can create organizers.

For the second option test that accounts have payment info on file.

@mariobehling mariobehling changed the title chore:Organizer creation chore: Organizer creation Oct 2, 2025
@mariobehling mariobehling changed the title chore: Organizer creation chore(ui/permissions): hide “Create Organizer” in admin tickets page, allow creation in common organizers view Oct 6, 2025
@mariobehling
Copy link
Member

Following the above comment which requires to add an option for create organiser permissions in /tickets/control/admin/global/settings/ should follow the PR at #794. We need this PR to be made against the enext branch first.

Copy link
Member

@mariobehling mariobehling left a comment

Choose a reason for hiding this comment

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

Please make the required changes to display the create organizer option depending on the platform configuration.

@Saksham-Sirohi
Copy link
Contributor Author

Screenshot 2025-11-02 at 1 35 21 AM @mariobehling updated pr please take a look

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements configurable permissions for organizer creation by introducing a new OrganizerCreationPermissionMixin that allows system administrators to control who can create organizers through global settings. Previously, only users with active staff sessions could create organizers.

Key changes:

  • Added OrganizerCreationPermissionMixin with configurable permission logic based on global settings
  • Introduced two new global settings: allow_all_users_create_organizer and allow_payment_users_create_organizer
  • Updated OrganizerCreate and OrganizerList views to use the new permission mixin and display create buttons conditionally

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
app/eventyay/control/permissions.py Added OrganizerCreationPermissionMixin with _can_create_organizer and _user_has_payment_info helper methods
app/eventyay/control/forms/global_settings.py Added two new boolean fields for controlling organizer creation permissions
app/eventyay/control/views/organizer_views/organizer_view.py Integrated permission mixin into OrganizerCreate and OrganizerList views with permission checks in dispatch
app/eventyay/control/templates/pretixcontrol/organizers/index.html Conditionally display create button based on can_create_organizer context variable
app/eventyay/eventyay_common/views/organizer.py Integrated permission mixin into OrganizerCreate and OrganizerList views with permission checks in dispatch
app/eventyay/eventyay_common/templates/eventyay_common/organizers/index.html Changed from staff_session to can_create_organizer for displaying create button

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Feat: Add Organizer Creation Permission Settings in Admin and Remove “Create Organizer” from Tickets Area

4 participants