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

Wheres my RA release #1120

Merged
merged 97 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
97 commits
Select commit Hold shift + click to select a range
2c809df
Create Housing DB Context
RossClark01 Oct 10, 2024
83fe575
Combined tables to clean up redundency
RossClark01 Oct 13, 2024
1718d7e
Refactored to eliminate resident_advisor and Halls table. This allows…
RossClark01 Oct 16, 2024
0a3d0ee
Create views for RD's, RA's, and current on call RA
RossClark01 Oct 17, 2024
7ba952f
Work on API for creating room range
RossClark01 Oct 20, 2024
3468158
Update ViewModel
RossClark01 Oct 20, 2024
d8c4d8b
Update ViewModel directive
RossClark01 Oct 20, 2024
654c1a4
More work to get API running. added to interface and imported needed …
RossClark01 Oct 20, 2024
df103bd
Delete room range API
RossClark01 Oct 22, 2024
3a4f09f
Included 360 custom exceptions and use range_id
RossClark01 Oct 22, 2024
7dadebb
Merge pull request #1075 from RossClark01/WMRA_DB_Context
jtasonye Oct 22, 2024
552d1cb
Added view for Halls and updated tasks to be hall dependent
RossClark01 Oct 24, 2024
372d42b
Merge pull request #1077 from RossClark01/WMRA_DB_Context
dli505 Oct 25, 2024
0b0309d
Room Range API Work
RossClark01 Oct 26, 2024
08c1441
updated parameters. tested api in swagger
RossClark01 Oct 26, 2024
e90212e
Added API to get all room ranges
RossClark01 Oct 28, 2024
6787578
Edited parameters and imported component to use list
RossClark01 Oct 28, 2024
e30987a
Room Range API
Mrand03 Oct 29, 2024
afa8d07
API to get list of RAs
RossClark01 Oct 29, 2024
886eba7
Updates to avoid reference loop
RossClark01 Oct 29, 2024
0d59bb8
Context files for Halls and view for ra assigned ranges. modified sta…
RossClark01 Oct 31, 2024
bda3fa2
API for Pulling Assigned Ranges
RossClark01 Oct 31, 2024
f0011bb
adjusted call to view model. tested with success
RossClark01 Oct 31, 2024
014e4a9
Modified create room range to enforce rooms as ints and room end grea…
RossClark01 Oct 31, 2024
956ee38
Merge branch 'wheres-my-ra' into RoomRange-API
Mrand03 Oct 31, 2024
b788bd9
Merge pull request #1080 from RossClark01/RoomRange-API
Mrand03 Oct 31, 2024
f6a20c7
Create API route for adding status events for RA/AC schedules
jtasonye Nov 3, 2024
bfe2b88
Added api route to ServiceInterface.cs
jtasonye Nov 3, 2024
6d4d2ad
Merge pull request #1087 from gordon-cs/wmr-schedule-status
RossClark01 Nov 3, 2024
1900d42
API to delete an ra range assignment
RossClark01 Nov 3, 2024
672e9d8
Merge pull request #1088 from RossClark01/RoomRange-API
Mrand03 Nov 4, 2024
76ead9f
API for RA Checkin
RossClark01 Nov 6, 2024
cd9e540
Tested checkin api. does not currently deal with the default checkout…
RossClark01 Nov 6, 2024
4561871
Added Range_ID to the endpoint for getting all assignmnets
RossClark01 Nov 6, 2024
4b9cadf
API to get on call for a specific hall and all halls
RossClark01 Nov 7, 2024
7e319f2
Merge pull request #1090 from RossClark01/RA-Checkin-API
RossClark01 Nov 8, 2024
2fd99f4
Merge pull request #1089 from RossClark01/RoomRange-API
Mrand03 Nov 8, 2024
25b5988
wmr - Reworked GetResidentRA API route
jtasonye Nov 10, 2024
692c050
Added check on remove room range to see if it is currently assigned t…
RossClark01 Nov 11, 2024
de7f72b
wmr - Fixed API call to return a RA_StudentsViewModel object
jtasonye Nov 12, 2024
d9bf4c1
Merge pull request #1092 from gordon-cs/wmr-fetch-RA-info
RossClark01 Nov 12, 2024
b5a74bb
Merge pull request #1093 from RossClark01/RoomRange-API
RossClark01 Nov 12, 2024
0b9658e
API for setting and getting the pref contact for an RA
RossClark01 Nov 12, 2024
bd62164
Merge branch 'wheres-my-ra' into RA_Pref_Contact_API
RossClark01 Nov 12, 2024
e8093a5
Relocated method
RossClark01 Nov 12, 2024
2e5b6af
Updated on call returns to provide info needed for the front end
RossClark01 Nov 13, 2024
b4fe9b0
Merge pull request #1094 from RossClark01/RA_Pref_Contact_API
jtasonye Nov 14, 2024
073475b
Merge branch 'wheres-my-ra' into RA-Checkin-API
RossClark01 Nov 14, 2024
e6b5ad9
Merge pull request #1096 from RossClark01/RA-Checkin-API
RossClark01 Nov 14, 2024
02cdf51
Update HousingService.cs
RossClark01 Nov 14, 2024
4d72b8f
Fixing issues from merge conflict
RossClark01 Nov 14, 2024
bf56f0d
Renamed and reordered API's
RossClark01 Nov 14, 2024
60e2805
Merge pull request #1097 from gordon-cs/API-Refactor
dli505 Nov 17, 2024
45b07a0
Added API for determining if an RA is checked in
RossClark01 Nov 19, 2024
5ef571a
Merge branch 'RA-Checkin-API' of https://github.com/RossClark01/gordo…
RossClark01 Nov 19, 2024
1258a8e
Merge branch 'wheres-my-ra' into RA-Checkin-API
RossClark01 Nov 19, 2024
161617f
Updated on call to return the RD name as well as the RA photo url.
RossClark01 Nov 19, 2024
608b4a8
Merge pull request #1098 from RossClark01/RA-Checkin-API
RossClark01 Nov 19, 2024
805e064
Added Hall_ID to assignment rranges to help with filtering info on th…
RossClark01 Nov 19, 2024
8dd3ec1
Merge pull request #1099 from RossClark01/RA-Checkin-API
RossClark01 Nov 19, 2024
ac91ad7
Update RA student view to include Photo URL in GetResidentRA API
RossClark01 Nov 21, 2024
7ca7649
Merge pull request #1100 from RossClark01/RA-Checkin-API
jtasonye Nov 21, 2024
b3cd7ce
Added `GetResidentRDAsync` function
jtasonye Nov 23, 2024
5b2cdd5
Merge pull request #1102 from gordon-cs/display-rd-onduty-info
jtasonye Nov 24, 2024
74308de
added room number parameter to on call get view model
jtasonye Nov 27, 2024
d9a18d7
Updated GetOnCallRA function to return roomNumber as one of the field…
jtasonye Nov 27, 2024
5664f0b
Merge pull request #1103 from gordon-cs/display-rd-onduty-info
RossClark01 Nov 28, 2024
e5edeab
Added the get,set for RD_Name and RA_Photo into the GetOnCallRA function
jtasonye Nov 30, 2024
f47c749
Merge pull request #1105 from gordon-cs/display-rd-onduty-info
Mrand03 Nov 30, 2024
87be1c4
Updated tables for Hall Tasks
RossClark01 Nov 30, 2024
5cba0ff
Setup senior project builds
EjPlatzer Dec 3, 2024
95144e6
Added API to check RA Pref Contact Method
RossClark01 Dec 4, 2024
e04dd63
Added `PreferredContact` to the API for getting a resident's RA
RossClark01 Dec 5, 2024
ce8692e
Merge pull request #1109 from gordon-cs/RA_Pref_Contact_Updates
jtasonye Dec 5, 2024
7966b97
Merge branch 'senior-project' into wheres-my-ra
RossClark01 Dec 5, 2024
754d573
Added `StateYourBusiness` for API route protecting. Added new auth gr…
RossClark01 Dec 7, 2024
b277111
API to determine if a student is residential. This will be used to de…
RossClark01 Dec 7, 2024
c2c4f45
Fixing issue with view schema
RossClark01 Dec 7, 2024
dcf86f6
Merge pull request #1112 from gordon-cs/WMRA-Route-Protection
jtasonye Dec 7, 2024
6dc6296
Removed Default Schema
RossClark01 Dec 7, 2024
057a4ab
Merge pull request #1113 from gordon-cs/Residential_Student_API
jtasonye Dec 7, 2024
3a51063
Adjusted api routes. Code cleanup to follow
RossClark01 Dec 11, 2024
0c03cf7
Further Housing Controller cleanup
RossClark01 Dec 11, 2024
8d1d067
Further updates from code review
RossClark01 Dec 11, 2024
44c9436
removed default schema
RossClark01 Dec 11, 2024
a10e9d7
Adjust resdiential status to be bool. updated logic for function
RossClark01 Dec 11, 2024
7001703
Combined tables and logic for Hall ranges and assignments
RossClark01 Dec 12, 2024
b30bdb3
Contact preference endpoints combined into a single call
RossClark01 Dec 12, 2024
adbdac9
API modification for passing 360 URLs
RossClark01 Dec 12, 2024
09111e7
Update exception thrown for bad input
RossClark01 Dec 12, 2024
122e51f
Merge pull request #1119 from gordon-cs/wmr-merge-API-fixes
RossClark01 Dec 12, 2024
05bdd4d
Merge branch 'develop' into wheres-my-ra
RossClark01 Dec 12, 2024
9be5ed9
added comma to fix error
RossClark01 Dec 12, 2024
ea8d196
Revert "Setup senior project builds"
RossClark01 Dec 12, 2024
0bfa745
update StateYourBusiness for RA_Checkin
RossClark01 Dec 12, 2024
46e7dce
Update StateYourBusiness.cs remove HousingDevelopers
RossClark01 Dec 16, 2024
2a6c921
Update StateYourBusiness.cs
RossClark01 Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions Gordon360/Authorization/StateYourBusiness.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public async override Task OnActionExecutionAsync(ActionExecutingContext actionC
_recimParticipantService = context.HttpContext.RequestServices.GetRequiredService<IParticipantService>();
_recimTeamService = context.HttpContext.RequestServices.GetRequiredService<ITeamService>();
_recimActivityService = context.HttpContext.RequestServices.GetRequiredService<Services.RecIM.IActivityService>();

user_name = AuthUtils.GetUsername(authenticatedUser);
user_groups = AuthUtils.GetGroups(authenticatedUser);

Expand Down Expand Up @@ -188,6 +188,11 @@ private async Task<bool> CanReadOneAsync(string resource)
}
return false;
}
case Resource.HOUSING_CONTACT_PREFERENCE:
return (user_groups.Contains(AuthGroup.RD) || user_groups.Contains(AuthGroup.HousingAdmin) ||
user_groups.Contains(AuthGroup.HallInfoViewer) || user_groups.Contains(AuthGroup.Student));
case Resource.HOUSING_ON_CALL_RA:
return (user_groups.Contains(AuthGroup.Student));
case Resource.NEWS:
return true;
case Resource.STUDENT_SCHEDULE:
Expand Down Expand Up @@ -398,6 +403,13 @@ private bool CanReadAll(string resource)
}
return false;
}
case Resource.HOUSING_ROOM_RANGE:
return (user_groups.Contains(AuthGroup.HousingAdmin) || user_groups.Contains(AuthGroup.RD));
case Resource.HOUSING_RA_ASSIGNMENT:
return (user_groups.Contains(AuthGroup.HousingAdmin) || user_groups.Contains(AuthGroup.RD));
case Resource.HOUSING_ON_CALL_RA:
return (user_groups.Contains(AuthGroup.RD) || user_groups.Contains(AuthGroup.HallInfoViewer) ||
user_groups.Contains(AuthGroup.HousingAdmin));
case Resource.NEWS:
return user_groups.Contains(AuthGroup.NewsAdmin);
case Resource.RECIM:
Expand Down Expand Up @@ -502,6 +514,14 @@ private async Task<bool> CanAddAsync(string resource)
}
return false;
}
case Resource.HOUSING_ROOM_RANGE:
return (user_groups.Contains(AuthGroup.HousingAdmin) || user_groups.Contains(AuthGroup.RD));
case Resource.HOUSING_RA_ASSIGNMENT:
return (user_groups.Contains(AuthGroup.HousingAdmin) || user_groups.Contains(AuthGroup.RD));
case Resource.HOUSING_CONTACT_PREFERENCE:
return (user_groups.Contains(AuthGroup.RA));
case Resource.RA_CHECKIN:
return (user_groups.Contains(AuthGroup.RA));
case Resource.ADMIN:
return false;
case Resource.ERROR_LOG:
Expand Down Expand Up @@ -855,6 +875,10 @@ private async Task<bool> CanDeleteAsync(string resource)
// Super admins have unrestricted access by default: no need to check
return false;
}
case Resource.HOUSING_ROOM_RANGE:
return (user_groups.Contains(AuthGroup.HousingAdmin) || user_groups.Contains(AuthGroup.RD));
case Resource.HOUSING_RA_ASSIGNMENT:
return (user_groups.Contains(AuthGroup.HousingAdmin) || user_groups.Contains(AuthGroup.RD));
case Resource.NEWS:
{
if (context.ActionArguments["newsID"] is int newsID)
Expand Down Expand Up @@ -903,4 +927,4 @@ private async Task<bool> CanDeleteAsync(string resource)
}


}
}
Loading
Loading