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

Quality/usehashids units #373

Draft
wants to merge 2,315 commits into
base: development
Choose a base branch
from

Conversation

sneaky-patriki
Copy link

Description

  • Install hashids library into the project
  • Encode ids returned by the /units endpoint

Questions

  • Variable salt needed?

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if appropriate
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have created or extended unit tests to address my new additions
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

If you have any questions, please contact @macite or @jakerenzella.

jakerenzella and others added 30 commits September 18, 2021 02:59
macite and others added 26 commits March 10, 2022 22:11
Reinstate use of the task_stats field to cache task status counts on
update of target grade and tasks status. This improves performance
of student query when loading a unit for staff.

Co-authored-by: Tan Le <[email protected]>
Co-authored-by: Ray Guo <[email protected]>
Co-authored-by: talzid <[email protected]>
…ete-pid

fix:fix the manual delete servers.pid file after restart container
…ms#364)

refactor ternary operator which creates student_name to ensure nicknames with a value of "" are not rendered
…-unit-load-times

Perf/fix project and unit load times
Currently the endpoint that handles SAML authentication is named /auth/jwt. This endpoint still exists, and there is a new endpoint called /auth/saml2 which will eventually replace the former.
Moved copied /auth/jwt and /auth/saml2 logic into a seperate file with function
Encode the ids of the units returned from /units using the hashids library. Update Gemfile and Gemfile.lock as needed.
Change authsamlhelper class to module, mark as helper for and prefix
correctly
Remove import authsamlhelper since helpers are imported by default
…/:id

Modify unit_entity.rb to expose the id as the hashid rather than actual id, this will affect all endpoints returni
ng units

Modify units_api.rb to decode the hashed id for the /units/:id endpoint
@sneaky-patriki sneaky-patriki force-pushed the quality/usehashids_units branch from 699668a to 30e4b5b Compare April 16, 2022 03:44
…dpoints

unit_by_id function which fetches a unit based on the decoded hashid
This function is called in all relevant endpoints where a hashid will now be passed in.
@macite macite marked this pull request as draft April 27, 2024 00:08
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.

6 participants