Skip to content

Commit

Permalink
Merge pull request #861 from WPI-LNL/fix-pm-field-permissions
Browse files Browse the repository at this point in the history
Fix pm field permissions
  • Loading branch information
alextannenbaum authored Aug 1, 2024
2 parents 21a089a + dfa6fac commit 7e34ef0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions events/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,12 @@ def __init__(self):

change_lnl_contact = FieldAccessLevel(
lambda user, instance: user.has_perm('events.edit_event_lnl_contact', instance),
enable=('lnl_contact')
enable=('lnl_contact',)
)

change_event_status = FieldAccessLevel(
lambda user, instance: user.has_perm('events.edit_event_status', instance),
enable=('event_status')
enable=('event_status',)
)

class Meta:
Expand Down Expand Up @@ -686,12 +686,12 @@ def __init__(self):

change_lnl_contact = FieldAccessLevel(
lambda user, instance: user.has_perm('events.edit_event_lnl_contact', instance),
enable=('lnl_contact')
enable=('lnl_contact',)
)

change_event_status = FieldAccessLevel(
lambda user, instance: user.has_perm('events.edit_event_status', instance),
enable=('event_status')
enable=('event_status',)
)

change_entered_into_workday = FieldAccessLevel(
Expand Down Expand Up @@ -733,7 +733,7 @@ class Meta:
group_label=lambda group: group.name,
)
contact = AutoCompleteSelectField('Users', required=False)
lnl_contact = AutoCompleteSelectField('Members', label="LNL Contact (PM)", required=False)
lnl_contact = AutoCompleteSelectField('Members', label="LNL Contact", required=False)
org = CustomAutoCompleteSelectMultipleField('Orgs', required=False, label="Client(s)")
billing_org = AutoCompleteSelectField('Orgs', required=False, label="Client to bill")
datetime_setup_complete = forms.SplitDateTimeField(initial=timezone.now, label="Setup Completed")
Expand Down
2 changes: 1 addition & 1 deletion site_tmpl/uglydetail.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ <h3 id="reopenModalLabel">Confirm Reopen Event</h3>
<td>{{event.event_status}}</td>
</tr>
<tr>
<th>LNL Contact (PM)</th>
<th>LNL Contact</th>
<td>
{% if event.lnl_contact %}
<a href="{% url "accounts:detail" event.lnl_contact.id %}">{{ event.lnl_contact.get_full_name }}</a>
Expand Down

0 comments on commit 7e34ef0

Please sign in to comment.