Skip to content

Commit

Permalink
Fix role assignments by the TA to include Mentor
Browse files Browse the repository at this point in the history
Also improved some text layout
  • Loading branch information
Celeo committed Dec 30, 2024
1 parent 5bbc8d6 commit 874a274
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion vzdv-site/src/endpoints/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async fn roles_to_set(
};
let mut roles_to_set = Vec::new();
let user_roles: Vec<_> = match &controller {
Some(c) => c.roles.split_terminator('\n').collect(),
Some(c) => c.roles.split_terminator(',').collect(),
None => {
return Ok(HashSet::new());
}
Expand All @@ -61,6 +61,8 @@ async fn roles_to_set(
roles_to_set.push(StaffPosition::AFE);
} else if user_roles.contains(&"EC") {
roles_to_set.push(StaffPosition::AEC);
} else if user_roles.contains(&"TA") {
roles_to_set.push(StaffPosition::MTR);
} else if controller_can_see(&controller, PermissionsGroup::Admin) {
roles_to_set.push(vzdv::StaffPosition::ATM);
roles_to_set.push(vzdv::StaffPosition::DATM);
Expand Down
2 changes: 2 additions & 0 deletions vzdv-site/templates/changelog.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
<div class="card-text">
<ul>
<li>Minor text improvement to solo certs page</li>
<li>Minor text improvement to controller page</li>
<li>Changed role assignments by the TA</li>
</ul>
</div>
</div>
Expand Down
7 changes: 5 additions & 2 deletions vzdv-site/templates/controller/controller.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,11 @@

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

0 comments on commit 874a274

Please sign in to comment.