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

Feature - Combine predefined and action based roles #528

Merged

Conversation

v-stamenova
Copy link
Collaborator

@v-stamenova v-stamenova commented Jul 17, 2024

Description

This branch introduces middleground between the "action based" roles and the "predefined" role. The branch allows the company representative to invite members that can have the role speaker, booth owner and company member. The branch restricts also the option to change roles once they're set in.

User invited as a speaker can request presentation (if there is a space for presentation in the company) or join already existing presentation.

User invited as a booth owner can request booth (if such is not requested yet) or join the other booth owners.

User invited as a company member can request presentation (if there is a space for presentation in the company) or join already existing presentation, request booth (if such is not requested yet) or join the other booth owners. Once they take an action towards booth or presentation they'll become speaker or booth owner. If they don't take a decision they'll remain company members.

closes #510 (and maybe others I am not sure)

Type of change

  • 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) (MAYBE)
  • This change requires a documentation update

What needs to be tested

  • Register as company representative and approve the company (mod)
  • Invite like 6/7 users or so
  • Register/Log in as user who is company member and check that you can request a presentation (reject it as a mod so that you don't constantly migrate:fresh)
  • Register/Log in as user who is company member and check that you can request a booth (reject it as a mod so that you don't constantly migrate:fresh)
  • Register/Log in as user who is speaker and check that you can request a presentation (approve it as a mod)
  • Register/Log in as user who is speaker and check that you can join the other presentation as speaker
  • Register/Log in as user who is company member and check that you can join the other presentation as speaker
  • Register/Log in as user who is booth owner and check that you can request a booth (approve it as a mod)
  • Register/Log in as user who is booth owner and check that you can join the other booth owners
  • Register/Log in as user who is company member and check that you can join the other booth owners

The gold sponsor was working as well but check it as well (so 2 presentations but make sure you free the gold sponsor route either from mod or from the database)

Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@v-stamenova v-stamenova added high priority backend issues/features related to the backend labels Jul 17, 2024
@v-stamenova v-stamenova self-assigned this Jul 17, 2024
Copy link

github-actions bot commented Jul 17, 2024

Coverage report for commit: c429479
File: coverage.xml

Cover ┌─────────────────────────┐ Freq.
   0% │ ███████████████████████ │ 71.8%
  10% │ █░░░░░░░░░░░░░░░░░░░░░░ │  2.4%
  20% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.9%
  30% │ █░░░░░░░░░░░░░░░░░░░░░░ │  2.9%
  40% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.0%
  50% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.5%
  60% │ █░░░░░░░░░░░░░░░░░░░░░░ │  0.5%
  70% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.4%
  80% │ █░░░░░░░░░░░░░░░░░░░░░░ │  1.9%
  90% │ █░░░░░░░░░░░░░░░░░░░░░░ │  2.4%
 100% │ █████░░░░░░░░░░░░░░░░░░ │ 13.4%
      └─────────────────────────┘
 *Legend:* █ = Current Distribution 
Summary - Lines: 28.08% | Methods: 22.97%
FilesLinesMethodsBranches
app/Actions/Fortify
   CreateNewUser.php90.24%25.00%100.00%
   PasswordValidationRules.php100.00%100.00%100.00%
   ResetUserPassword.php100.00%100.00%100.00%
   UpdateUserPassword.php100.00%100.00%100.00%
   UpdateUserProfileInformation.php72.73%50.00%100.00%
app/Actions/Jetstream
   DeleteUser.php100.00%100.00%100.00%
app/Actions/Permissions
   ReadPermissionConfig.php100.00%100.00%100.00%
app/Actions/Schedule
   PresentationAllocationHelper.php--100.00%
   PresentationConflictChecker.php--100.00%
   ResetSchedule.php--100.00%
app/Console/Commands
   AddSpeakerToPresentation.php--100.00%
   AddToHz.php--100.00%
   ApproveLastCreatedCompany.php--100.00%
   ConfirmAllEmails.php--100.00%
   CreateAdmin.php7.69%33.33%100.00%
   ModifyTimeslotDuration.php--100.00%
   SyncPermissions.php96.77%85.71%100.00%
   UpsertMasterData.php73.91%40.00%100.00%
app/Events
   FinalProgrammeReleased.php--100.00%
app/Http/Controllers
   CompanyController.php--100.00%
   Controller.php100.00%100.00%100.00%
   FrequentQuestionController.php--100.00%
   HomeController.php100.00%100.00%100.00%
   InvitationController.php--100.00%
   PresentationController.php--100.00%
   ProgrammeController.php--100.00%
   RegistrationController.php25.00%-100.00%
   SpeakerController.php--100.00%
app/Http/Controllers/Crew
   BoothController.php89.36%83.33%100.00%
   CompanyController.php96.81%75.00%100.00%
   CrewController.php--100.00%
   DefaultPresentationController.php100.00%100.00%100.00%
   EditionController.php--100.00%
   FrequentQuestionController.php--100.00%
   PresentationController.php87.27%66.67%100.00%
   RoomController.php88.00%80.00%100.00%
   ScheduleController.php--100.00%
   SponsorshipController.php95.00%66.67%100.00%
   UserController.php--100.00%
app/Http/Controllers/Hub
   CompanyController.php--100.00%
   ParticipantController.php--100.00%
app/Http/Livewire
   AuthNavigationMenu.php--100.00%
   DownloadPresentation.php--100.00%
   EmailNotificationPreference.php--100.00%
   GuestNavigationMenu.php--100.00%
   OverrideDifficulty.php--100.00%
   ReleaseFinalProgramme.php--100.00%
   RoomAndTimeslotSelector.php--100.00%
   ShowNotification.php--100.00%
app/Http/Livewire/Booths
   DeleteBoothForm.php--100.00%
   EditBoothModal.php--100.00%
app/Http/Livewire/Companies
   DeleteCompanyForm.php--100.00%
app/Http/Livewire/DefaultPresentations
   EditDefaultPresentationForm.php--100.00%
app/Http/Livewire/Presentations
   DeletePresentationForm.php--100.00%
   EditPresentationModal.php--100.00%
app/Http/Livewire/Rooms
   DeleteRoomForm.php--100.00%
app/Http/Livewire/Schedule
   AddTimeslotPadding.php--100.00%
   RemovePresentationFromSchedule.php--100.00%
   ReplacePresentation.php--100.00%
   ResetTimeslots.php--100.00%
app/Http/Livewire/Sponsorships
   CreateSponsorshipForm.php--100.00%
   DeleteSponsorshipForm.php--100.00%
app/Http/Livewire/Users
   DeleteUserForm.php--100.00%
app/Http/Middleware
   EditionMiddleware.php33.33%-100.00%
app/Http/Requests
   StorePresentationRequest.php100.00%100.00%100.00%
app/Listeners
   HandleFinalProgrammeReleased.php--100.00%
app/Livewire
   AuthNavigationMenu.php100.00%100.00%100.00%
   EmailNotificationPreference.php--100.00%
   GuestNavigationMenu.php100.00%100.00%100.00%
   NotificationsList.php--100.00%
app/Livewire/Booth
   DeleteBoothModal.php--100.00%
   EditBoothModal.php--100.00%
   JoinBoothOwnerModal.php--100.00%
app/Livewire/Company
   AddMember.php--100.00%
   BoothRequest.php--100.00%
   DeleteCompany.php--100.00%
   DeleteCompanyModal.php--100.00%
   DetailsForm.php--100.00%
   EditCompanyModal.php--100.00%
   ManageLogo.php--100.00%
   MemberManager.php--100.00%
   RemoveMember.php--100.00%
   SponsorshipRequest.php--100.00%
   UpdateMemberRole.php--100.00%
app/Livewire/Crew
   AssignRoleToUser.php--100.00%
   RevokeRoleOfUser.php--100.00%
   RolePermissionsInfo.php--100.00%
app/Livewire/Edition
   ActivateEditionModal.php--100.00%
   AddKeynoteModal.php--100.00%
   DeleteEditionModal.php--100.00%
   EditEditionModal.php--100.00%
app/Livewire/EditionEvent
   EditEditionEventModal.php--100.00%
app/Livewire/Forms
   BoothForm.php--100.00%
   CompanyForm.php--100.00%
   DefaultPresentationForm.php--100.00%
   EditionEventForm.php--100.00%
   EditionForm.php--100.00%
   FrequentQuestionForm.php--100.00%
   KeynoteForm.php--100.00%
   PresentationForm.php--100.00%
   RoomForm.php--100.00%
app/Livewire/FrequentQuestions
   DeleteFrequentQuestionModal.php--100.00%
   EditFrequentQuestionModal.php--100.00%
app/Livewire/Presentation
   DeletePresentationModal.php--100.00%
   EditPresentationModal.php--100.00%
   JoinAsSpeakerModal.php--100.00%
   UploadPresentation.php--100.00%
app/Livewire/Registration
   CompanyBasicForm.php8.33%25.00%100.00%
   CompanyInternshipsForm.php14.29%33.33%100.00%
   CompanyLocationForm.php10.00%33.33%100.00%
   CompanyMotivationForm.php16.67%33.33%100.00%
   CompanyRepresentativeForm.php7.69%33.33%100.00%
   ParentComponent.php2.44%25.00%100.00%
   SelectCountryCode.php25.00%28.57%100.00%
app/Livewire/Room
   DeleteRoomModal.php--100.00%
   EditRoomModal.php--100.00%
app/Livewire/Schedule
   AddDefaultPresentation.php--100.00%
   Cell.php--100.00%
   ConfirmResetScheduleModal.php--100.00%
   DefaultPresentation.php--100.00%
   EditDefaultPresentationModal.php--100.00%
   GridParentComponent.php--100.00%
   Presentation.php--100.00%
   PresentationModal.php--100.00%
   PublishProgrammeButton.php--100.00%
   PublishProgrammeModal.php--100.00%
app/Livewire/Sponsorship
   DeleteSponsorshipModal.php--100.00%
app/Livewire/Users
   UserFilteringList.php--100.00%
app/Mail
   BoothApprovedMailable.php100.00%100.00%100.00%
   BoothDisapprovedMailable.php--100.00%
   CancelledPresentationMailable.php--100.00%
   CompanyApprovedMailable.php100.00%100.00%100.00%
   CompanyDisapprovedMailable.php100.00%100.00%100.00%
   CompanyRepInvitation.php100.00%100.00%100.00%
   CustomCompanyInvitation.php--100.00%
   FinalProgrammeReleasedMailable.php--100.00%
   GenericNewUpdatesMailable.php--100.00%
   PresentationApprovedMailable.php--100.00%
   PresentationDisapprovedMailable.php--100.00%
   SponsorshipApprovedMailable.php100.00%100.00%100.00%
   SponsorshipDisapprovedMailable.php100.00%100.00%100.00%
   UserInvitation.php--100.00%
app/Models
   Booth.php80.00%50.00%100.00%
   Company.php84.06%70.59%100.00%
   DefaultPresentation.php--100.00%
   Difficulty.php--100.00%
   Edition.php17.31%29.41%100.00%
   EditionEvent.php--100.00%
   Event.php--100.00%
   FrequentQuestion.php100.00%100.00%100.00%
   InternshipAttribute.php--100.00%
   Invitation.php25.00%33.33%100.00%
   Presentation.php57.69%66.67%100.00%
   Room.php50.00%50.00%100.00%
   Sponsorship.php37.50%28.57%100.00%
   Timeslot.php--100.00%
   User.php77.78%62.50%100.00%
Table truncated to fit comment

🤖 comment via lucassabreu/comment-coverage-clover

@v-stamenova
Copy link
Collaborator Author

@TimKardol

I checked all of the scenarios we talked about and in my environment the following worked:

  • Register/Log in as user who is speaker and check that you can join the other presentation as speaker
  • Register/Log in as user who is company member and check that you can join the other presentation as speaker
  • Register/Log in as user who is booth owner and check that you can join the other booth owners

There was an issue with:

  • Register/Log in as user who is company member and check that you can join the other booth owners

I believe it was fixed with the new commits

@TimKardol TimKardol merged commit a172da3 into development Sep 16, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend issues/features related to the backend high priority
Projects
None yet
2 participants