Skip to content

Commit 874a274

Browse files
committed
Fix role assignments by the TA to include Mentor
Also improved some text layout
1 parent 5bbc8d6 commit 874a274

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

Diff for: vzdv-site/src/endpoints/controller.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async fn roles_to_set(
5252
};
5353
let mut roles_to_set = Vec::new();
5454
let user_roles: Vec<_> = match &controller {
55-
Some(c) => c.roles.split_terminator('\n').collect(),
55+
Some(c) => c.roles.split_terminator(',').collect(),
5656
None => {
5757
return Ok(HashSet::new());
5858
}
@@ -61,6 +61,8 @@ async fn roles_to_set(
6161
roles_to_set.push(StaffPosition::AFE);
6262
} else if user_roles.contains(&"EC") {
6363
roles_to_set.push(StaffPosition::AEC);
64+
} else if user_roles.contains(&"TA") {
65+
roles_to_set.push(StaffPosition::MTR);
6466
} else if controller_can_see(&controller, PermissionsGroup::Admin) {
6567
roles_to_set.push(vzdv::StaffPosition::ATM);
6668
roles_to_set.push(vzdv::StaffPosition::DATM);

Diff for: vzdv-site/templates/changelog.jinja

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
<div class="card-text">
2121
<ul>
2222
<li>Minor text improvement to solo certs page</li>
23+
<li>Minor text improvement to controller page</li>
24+
<li>Changed role assignments by the TA</li>
2325
</ul>
2426
</div>
2527
</div>

Diff for: vzdv-site/templates/controller/controller.jinja

+5-2
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,11 @@
273273

274274
<dialog id="modalChangeRoles">
275275
<h2 class="pb-3">Edit roles</h2>
276-
<p>These are roles <i>on this site</i> and do not change anything that VATUSA, etc. know about the controller.</p>
277-
<p>Sr Staff roles will sync from VATUSA, which may overwrite whatever is set here.</p>
276+
<p>
277+
These are roles <i>on this site</i> and do not change anything that VATUSA, etc. know about the controller.
278+
<br>
279+
Sr Staff and Mentor roles will sync from VATUSA, which may overwrite whatever is set here.
280+
</p>
278281
<form action="/controller/{{ controller.cid }}/roles" method="POST">
279282
{% for role in settable_roles %}
280283
<div class="row">

0 commit comments

Comments
 (0)