Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SYB to schedules #1065

Merged
merged 2 commits into from
Sep 5, 2024
Merged

Add SYB to schedules #1065

merged 2 commits into from
Sep 5, 2024

Conversation

bennettforkner
Copy link
Contributor

No description provided.

Gordon360/Authorization/StateYourBusiness.cs Outdated Show resolved Hide resolved
Gordon360/Authorization/StateYourBusiness.cs Outdated Show resolved Hide resolved
@@ -188,6 +190,10 @@ private async Task<bool> CanReadOneAsync(string resource)
}
case Resource.NEWS:
return true;
case Resource.STUDENT_SCHEDULE:
if (context.ActionArguments["username"] is string viewed_username)
return user_groups.Contains(AuthGroup.Advisors) || viewed_username.EqualsIgnoreCase(user_name) || _accountService.GetAccountByUsername(viewed_username).AccountType.EqualsIgnoreCase("FACULTY");
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not positive that ACCOUNT.AccountType == "FACULTY" will align perfectly with the profile.PersonType.includes('fac') check that we do on the front end to decide whether to show a person's schedule to another user. That's because Profile.PersonType is calculated based on whether a row was discovered in CCT.dbo.FacultyStaff for the given user.

This is a pretty grey concern though, and won't matter once the new code is in, so it should be fine to push through in this hotfix.

@EjPlatzer EjPlatzer mentioned this pull request Sep 5, 2024
@EjPlatzer EjPlatzer merged commit 07b4b19 into develop Sep 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants