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

add for_user and for_group in registration field #338

Merged
merged 2 commits into from
Apr 18, 2024

Conversation

diegoalzate
Copy link
Contributor

@diegoalzate diegoalzate commented Apr 17, 2024

closes #337

overview

added new columns for_user and for_group, this allows us to have fields that will show for either of the cases or both. It stops redundancy that we might have needed if used type: text column.

use cases

  • if an endpoint is not required it will not be checked at all
  • if it is required it will check if it is for user or for group. depending on the presence of groupId we will be able to know if a registration is for group or user

@diegoalzate diegoalzate added the feature New feature or request label Apr 17, 2024
@diegoalzate diegoalzate requested a review from camilovegag April 17, 2024 22:11
@diegoalzate diegoalzate self-assigned this Apr 17, 2024
@MartinBenediktBusch MartinBenediktBusch linked an issue Apr 18, 2024 that may be closed by this pull request
@MartinBenediktBusch MartinBenediktBusch requested review from MartinBenediktBusch and removed request for camilovegag April 18, 2024 08:01
Copy link
Collaborator

@MartinBenediktBusch MartinBenediktBusch left a comment

Choose a reason for hiding this comment

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

lgtm

@diegoalzate diegoalzate merged commit afafdfd into develop Apr 18, 2024
3 checks passed
@diegoalzate diegoalzate deleted the diego/add-type-to-registration-field branch April 18, 2024 14:27
MartinBenediktBusch added a commit that referenced this pull request Apr 19, 2024
* add for_user and for_group in registration field (#338)

* add migration for boolean registration field flags

* add validation for user and group registration fields

* Limit one registration per group (#339)

* limit one registration per group

* clean up logic

* add authorization on update registration

* fix authorization on an event level

---------

Co-authored-by: Diego Alzate <[email protected]>
diegoalzate added a commit that referenced this pull request Apr 19, 2024
* add question to group category table (#308)

* Add group id to registrations (#307)

* add new handler to get group registration

* remove scripts that will not be used

* move getting registration data to its own router

* refactor api endpoints

* fix tests

* fix another test

* improve error message

* remove migration

* merge migrations

* add registrations router to api router

* add router for categories (#310)

Co-authored-by: Martin Benedikt Busch <[email protected]>

* extract registration data from handler (#312)

* fix only bringing one registration for an event (#316)

* Fix typo in events.ts (#317)

* Update vote service to allow for different grouping dimensions when calculating the plurality score  (#311)

* update seed to create questions to group categories

* fix tests

* update vote service

* fix existing tests

* fix seed and update tests

* test query group category ids

* insert dummy uuid to allow IN in sql query

* cleanup

* remove unused var

* Add secret code service (#313)

* add migrations for secret

* add create group type

* update migrations for more control on user settings

* create group handler

* add join secret group handler

* add group from category handler

* add tests

* add handler to router

* fix rename issue

* Fix registrations creating new groups (#318)

* Bump to version 2.5.0 prerelease

* Diego/hide fields on group registration (#323)

* remove secret from get category groups endpoint

* fix typo on group categories router

* add migration to show fields on group registration

* Support groups without secret (#326)

* update join groups handler to support public groups

* remove undefined category with seed

* rename key from id to groupId in join group payload

* update permissions on scripts

* fix tests

* Remove the handling of null values  (#324)

* remove null values from usersToGroups

* fix seed and tests

* update seed

* fix vote service tests

* remove null from group handler

* Add alerts (#328)

* add alerts table

* add router for alerts

* add title, description and link to alerts

* fix build command (#329)

* seed a group with group category secrets (#330)

* fix groupId not saving (#331)

* add for_user and for_group in registration field (#338)

* add migration for boolean registration field flags

* add validation for user and group registration fields

* Limit one registration per group (#339)

* limit one registration per group

* clean up logic

* add authorization on update registration

* fix authorization on an event level

* adds better validation for fields and register field options in seed (#342)

* adds better validation for fields and register field options in seed

* make select field not required

---------

Co-authored-by: Martin Benedikt Busch <[email protected]>
Co-authored-by: Camilo Vega <[email protected]>
Co-authored-by: diegoalzate <[email protected]>
MartinBenediktBusch added a commit that referenced this pull request Apr 22, 2024
* add for_user and for_group in registration field (#338)

* add migration for boolean registration field flags

* add validation for user and group registration fields

* Limit one registration per group (#339)

* limit one registration per group

* clean up logic

* add authorization on update registration

* fix authorization on an event level

* adds better validation for fields and register field options in seed (#342)

* adds better validation for fields and register field options in seed

* make select field not required

---------

Co-authored-by: Diego Alzate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add type to registrationFields
2 participants