Skip to content

Commit ddd0a96

Browse files
Adding talk permissions clarity (#1281)
* The permission labels 'Can work with and change proposals' and 'Is a reviewer' were unclear about the actual permissions granted. Updated labels and added help text. * Add Talk permissions section to team create/edit page * Add migration for updated team permission labels * Update migration to match simplified permission labels * Add JavaScript to show/hide Review settings * consistence_last_line * Update app/eventyay/eventyay_common/templates/eventyay_common/organizers/teams/team_edit.html * Fix template syntax error and add deprecation notice * added proper migration --------- Co-authored-by: Mario Behling <mb@mariobehling.de>
1 parent 7fcfc6c commit ddd0a96

File tree

4 files changed

+78
-2
lines changed

4 files changed

+78
-2
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Generated migration for updating Team permission labels and help text
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('base', '0003_alter_question_type'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='team',
15+
name='can_change_submissions',
16+
field=models.BooleanField(
17+
default=False,
18+
help_text='Can edit submission details, change proposal states (accept/reject/waitlist), manage submission metadata, and oversee the review workflow. This provides full management permissions beyond standard reviewing.',
19+
verbose_name='Reviewer Manager — can edit and manage submissions'
20+
),
21+
),
22+
migrations.AlterField(
23+
model_name='team',
24+
name='is_reviewer',
25+
field=models.BooleanField(
26+
default=False,
27+
help_text='Can review and provide feedback on submissions but cannot edit details or change submission states.',
28+
verbose_name='Reviewer — can only review submissions'
29+
),
30+
),
31+
]

app/eventyay/base/models/organizer.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,8 +421,22 @@ class Meta:
421421

422422
# From Talk
423423
limit_tracks = models.ManyToManyField(to='Track', verbose_name=_('Limit to tracks'), blank=True)
424-
can_change_submissions = models.BooleanField(default=False, verbose_name=_('Can work with and change proposals'))
425-
is_reviewer = models.BooleanField(default=False, verbose_name=_('Is a reviewer'))
424+
can_change_submissions = models.BooleanField(
425+
default=False,
426+
verbose_name=_('Reviewer Manager — can edit and manage submissions'),
427+
help_text=_(
428+
'Can edit submission details, change proposal states (accept/reject/waitlist), '
429+
'manage submission metadata, and oversee the review workflow. '
430+
'This provides full management permissions beyond standard reviewing.'
431+
)
432+
)
433+
is_reviewer = models.BooleanField(
434+
default=False,
435+
verbose_name=_('Reviewer — can only review submissions'),
436+
help_text=_(
437+
'Can review and provide feedback on submissions but cannot edit details or change submission states.'
438+
)
439+
)
426440
force_hide_speaker_names = models.BooleanField(
427441
verbose_name=_('Always hide speaker names'),
428442
help_text=_(

app/eventyay/control/templates/pretixcontrol/organizers/team_edit.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{% extends "pretixcontrol/organizers/base.html" %}
22
{% load i18n %}
33
{% load bootstrap3 %}
4+
{# DEPRECATED: Team management has moved to /common area. This template is kept for backward compatibility only. #}
5+
{# For the active implementation with conditional field visibility, see: eventyay_common/organizers/teams/team_edit.html #}
46
{% block inner %}
57
{% if team %}
68
<h1>{% trans "Team:" %} {{ team.name }}</h1>
@@ -39,6 +41,14 @@ <h1>{% trans "Create a new team" %}</h1>
3941
{% bootstrap_field form.can_view_vouchers layout="control" %}
4042
{% bootstrap_field form.can_change_vouchers layout="control" %}
4143
</fieldset>
44+
<fieldset>
45+
<legend>{% trans "Talk permissions" %}</legend>
46+
{% bootstrap_field form.can_change_submissions layout="control" %}
47+
{% bootstrap_field form.is_reviewer layout="control" %}
48+
{% bootstrap_field form.force_hide_speaker_names layout="control" %}
49+
{% bootstrap_field form.limit_tracks layout="control" %}
50+
</fieldset>
51+
4252
<div class="form-group submit-group">
4353
<button type="submit" class="btn btn-primary btn-save">
4454
{% trans "Save" %}

app/eventyay/eventyay_common/templates/eventyay_common/organizers/teams/team_edit.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,25 @@ <h1>{% translate "Create a new team" %}</h1>
6464
</button>
6565
</div>
6666
</form>
67+
68+
<script>
69+
$(document).ready(function() {
70+
// Function to toggle review settings visibility
71+
function toggleReviewSettings() {
72+
if ($('#id_is_reviewer').is(':checked')) {
73+
$('#review-settings').show();
74+
} else {
75+
$('#review-settings').hide();
76+
}
77+
}
78+
79+
// Toggle on page load
80+
toggleReviewSettings();
81+
82+
// Toggle when checkbox changes
83+
$('#id_is_reviewer').change(function() {
84+
toggleReviewSettings();
85+
});
86+
});
87+
</script>
6788
{% endblock %}

0 commit comments

Comments
 (0)