-
Notifications
You must be signed in to change notification settings - Fork 14
S25 staff schedule error fix: #2656 #2657
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
base: develop
Are you sure you want to change the base?
Changes from all commits
0efeb5b
a710fc6
e14dacb
006273d
4554d0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,3 +30,8 @@ | |
| border-top-right-radius: 4px; | ||
| } | ||
| } | ||
|
|
||
| .quad-course { | ||
| max-width: 50%; | ||
| background-color: red; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,8 +38,9 @@ | |
|
|
||
| const isOnline = useNetworkStatus(); | ||
| const viewerIsPolice = useAuthGroups(AuthGroup.Police); | ||
| const [canReadStudentSchedules, setCanReadStudentSchedules] = useState<boolean>(); | ||
| const profileIsStudent = profile.PersonType?.includes('stu'); | ||
| const profileIsStaff = profile.Type == 'Staff'; // should we create an dict enum of the possible values? | ||
|
Check failure on line 43 in src/components/Profile/index.tsx
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The I think, rather than trying to work around this complexity in the frontend, we should clean up the logic in the backend. I think the ideal logic would be something like:
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would you suggest working on the authentication issue in its own branch or continuing the work you had in the schedule-quad branch?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good question. I think if you want to implement the third point in my original comment, you should probably continue work in my
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking into the branch, it is 513 commits behind develop, which would make it challenging to perform a clean merge (will definitely be easier later with more familiarity with the code). Maybe a rework of the solution from develop could be easier?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it will probably be easier to start fresh on the latest develop. Normally, that wouldn't be such an issue since you can simply rebase the commits, but there have been some really big formatting and whitespace changes in the interim, which git struggles with.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For option 3 in the authorization logic, the way the process is currently set up--checking for authorization for the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, that would work. Except I would say, if the requestor is a faculty/staff member, return all courses, otherwise return only instructor courses.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. okay. sounds good! Is it an issue if all faculty can see classes that a faculty or staff is taking?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I don't think so. It's part of faculty's job to see student's course schedules, and just because someone is a faculty or staff member doesn't mean they're not also a student.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi, |
||
|
|
||
| const createSnackbar = useCallback( | ||
| (message: string, severity: AlertColor, link?: string, linkText?: string) => { | ||
|
|
@@ -84,11 +85,12 @@ | |
| </Grid> | ||
| )} | ||
|
|
||
| {(myProf || !profileIsStudent || canReadStudentSchedules) && ( | ||
| { | ||
| // is it only faculty that have schedule? could we say if faculty instead here? | ||
| <Grid item xs={12} lg={10}> | ||
| <SchedulePanel profile={profile} myProf={myProf} /> | ||
| </Grid> | ||
| )} | ||
| } | ||
|
|
||
| <Grid item xs={12} lg={5}> | ||
| <Grid container spacing={2}> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
AuthErrorcomes from Microsoft's Authentication library, and is unrelated to authorization errors thrown by the backend.