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

Added Staff Shift endpoints #134

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Added Staff Shift endpoints #134

wants to merge 13 commits into from

Conversation

akulsharma1
Copy link
Contributor

  • added all staff shift endpoints
  • NOTE: /staff/shift returns dummy data at the moment, we are working on bugfixing a timeout request issue but wanted to push out an MVP.

Copy link
Contributor

@lasyaneti lasyaneti left a comment

Choose a reason for hiding this comment

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

LGTM for now. Just change dates for staff shifts (might need to do it manually in mongo for existing events too) and we can merge.

Eventually GET /staff/shift should only return events for authenticated staff.

src/services/event/event-router.ts Outdated Show resolved Hide resolved
src/services/staff/staff-router.ts Outdated Show resolved Hide resolved
const payload: JwtPayload = res.locals.payload as JwtPayload;

if (!hasStaffPerms(payload)) {
if (!hasAdminPerms(payload)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why change this? All staff should be able to see staff events

Hierarchy should be like this:

non-staff: no access
staff: access to their own shifts + all general staff events
admins: access to staff shifts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants