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

feat: Added database migration for banning users #12558

Merged
merged 17 commits into from
Jul 10, 2024

Conversation

skalidindi53
Copy link
Contributor

@skalidindi53 skalidindi53 commented Jun 21, 2024

☑️ Resolves

🛠️ API Checklist

🚧 Tasks

  • Create the API contracts, already done with ⛔ feat(ban): Contract for banning attendees and IP/ranges #12259
  • Create the database migration in lib/Migration/ (create a skeleton file with matching name by using occ migrations:generate spreed 20000)
    1. Check the contract for needed fields
    2. Get inspired from Version18000Date20230808120823 how to define the oc_talk_bans table, columns and indixes
  • Create the entity and basic mapper in lib/Model/ (Reminder and ReminderMapper look like they have all data types you need aswell). The base class QBMapper has quite some methods and involves magic methods, so it can be a bit confusing to work with in the beginning.
  • Create a service (or put the methods into the BanMapper) to handle validating, creating, retrieving and deleting bans
  • Use the service or mapper in the controller and other code blocks that were touched for the contract in step 1
  • Write integration tests (I'd put them into tests/integration/features/conversation-1/ban.feature)
  • Ensure all queries are covered by indexes

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not possible
  • 📘 API documentation in docs/ has been updated or is not required
  • 🔖 Capability is added or not needed

@skalidindi53 skalidindi53 force-pushed the skalidindi53/12292/Banning-users-and-guests branch from 76eae28 to c72b203 Compare June 21, 2024 15:39
Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

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

And you need to bump the last digit in the version of appinfo/info.xml

lib/Migration/Version20000Date20240621150333.php Outdated Show resolved Hide resolved
lib/Migration/Version20000Date20240621150333.php Outdated Show resolved Hide resolved
lib/Migration/Version20000Date20240621150333.php Outdated Show resolved Hide resolved
lib/Migration/Version20000Date20240621150333.php Outdated Show resolved Hide resolved
@skalidindi53 skalidindi53 force-pushed the skalidindi53/12292/Banning-users-and-guests branch 4 times, most recently from 98f5fc2 to 2aa0921 Compare June 21, 2024 18:33
lib/Model/Ban.php Outdated Show resolved Hide resolved
lib/Model/BanMapper.php Outdated Show resolved Hide resolved
lib/Service/BanService.php Outdated Show resolved Hide resolved
@nickvergessen nickvergessen added this to the 💙 Next Major (30) milestone Jun 24, 2024
@skalidindi53 skalidindi53 force-pushed the skalidindi53/12292/Banning-users-and-guests branch 3 times, most recently from d266235 to eec0d2c Compare June 24, 2024 13:47
@skalidindi53 skalidindi53 force-pushed the skalidindi53/12292/Banning-users-and-guests branch 8 times, most recently from c105d5f to 5d1eae1 Compare June 24, 2024 18:49
@skalidindi53 skalidindi53 force-pushed the skalidindi53/12292/Banning-users-and-guests branch 3 times, most recently from 68df1ff to 49185c1 Compare June 28, 2024 20:21
@skalidindi53 skalidindi53 force-pushed the skalidindi53/12292/Banning-users-and-guests branch from 35d1afd to 08a3c7a Compare July 8, 2024 14:04
@Antreesy

This comment was marked as outdated.

@skalidindi53 skalidindi53 force-pushed the skalidindi53/12292/Banning-users-and-guests branch 2 times, most recently from eebc99e to b04e410 Compare July 10, 2024 05:03
@skalidindi53 skalidindi53 marked this pull request as ready for review July 10, 2024 05:08
@nickvergessen nickvergessen force-pushed the skalidindi53/12292/Banning-users-and-guests branch from b04e410 to 53f7c4b Compare July 10, 2024 11:00
skalidindi53 and others added 15 commits July 10, 2024 13:00
Signed-off-by: Joas Schilling <[email protected]>
Signed-off-by: Joas Schilling <[email protected]>
@nickvergessen nickvergessen force-pushed the skalidindi53/12292/Banning-users-and-guests branch from 53f7c4b to ed93b6f Compare July 10, 2024 11:01
@skalidindi53 skalidindi53 merged commit 193b70e into main Jul 10, 2024
64 checks passed
@skalidindi53 skalidindi53 deleted the skalidindi53/12292/Banning-users-and-guests branch July 10, 2024 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

⛔ Banning users and guests - API
3 participants