Skip to content

Add ability to search through applicants#186

Merged
petschekr merged 9 commits intomasterfrom
search-applicants
Oct 9, 2017
Merged

Add ability to search through applicants#186
petschekr merged 9 commits intomasterfrom
search-applicants

Conversation

@petschekr
Copy link
Copy Markdown
Member

@petschekr petschekr commented Oct 9, 2017

  • Adds a bunch more information accessible via the GraphQL API such as:
    • Search result information (offset, count, total matching)
    • Login methods and admin status for users
    • Name of team
    • Label of form items (not just name)
    • Human formatted file size
  • Allows you to search through applicants by name or email
  • You can enable or disable searching with regular expressions
  • Filter by confirmed / not confirmed in addition to accepted / no decision
    • (Filtering by confirmed / not confirmed only searches through accepted applicants)

Probably coming soon:tm:: displaying confirmation data in addition to the application data already present

Closes #183

@petschekr petschekr added enhancement Adds or suggests a new feature, rewrite, or other enhancement to the codebase high priority labels Oct 9, 2017
@petschekr petschekr added this to the HackGT 4 milestone Oct 9, 2017
@hackgbot
Copy link
Copy Markdown

hackgbot commented Oct 9, 2017

Hey y'all! A deployment of this PR can be found here:
https://registration-search-applicants.pr.hack.gt

Comment thread api.graphql Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is SearchResult nullable?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No it's not, I'll fix that

Comment thread client/admin.html Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What's the difference between accepted and not-confirmed? Where does not-confirmed apply to a user (since a single application branch can potentially have multiple confirmation branches)?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Accepted includes all accepted applicants regardless of whether or not they have confirmed whereas not confirmed only includes accepted applicants who have not confirmed

Comment thread client/js/admin.ts Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@illegalprime Is there a way to just specify "Get all info about the user"? That would clean up this query a lot

Comment thread server/routes/api/graphql.ts Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we have to worry about escaping here since this is user supplied input?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Escaping happens on line 54 right above this. Input is normally escaped unless the user ticks the Use Regex box in which case it is directly passed through. I don't see any security implications to doing that because the regular expressions only retrieve data and because this feature is already restricted to admins only.

Comment thread server/routes/api/graphql.ts Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Might want to refactor this later if we ever want to add other login providers in a modular way

@petschekr petschekr merged commit bb30d43 into master Oct 9, 2017
@petschekr petschekr deleted the search-applicants branch February 25, 2019 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Adds or suggests a new feature, rewrite, or other enhancement to the codebase high priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants