Ensure Fider Account is Disabled When Main Account is Deleted or Banned #46
Labels
No labels
automated
code-quality
component: admin dashboard
component: backend
component: billing
component: content management
component: faqs
component: game genres
component: game lists
component: game reviews
component: game search
component: games
component: internal notifications
component: platforms
component: security
component: tests
component: user api
component: user badges
component: user blogs
component: user consoles
component: user favorites
component: user friends
component: user notifications
component: user profiles
component: user site notifications
component: user wishlists
component: web design
dependencies
php
priority
high
priority
low
priority
medium
security-hotspot
source: codex
source: sonarqube
status
awaiting feedback
status
backlog
status
done
status
in progress
status
in queue
status
in review
status
needs codex review
status
needs investigation
status
wontfix
type: bug
type: documentation
type: feature
type: improvement
type: regression
type: task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MyVideoGameList/myvideogamelist.com#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When an account on the main website is deleted by the user or banned by the team we need to ensure the account on the Fider end of things is also disabled.
This code should help (https://github.com/getfider/fider/blob/main/app/models/enum/user_status.go). We're likely going to have to run a manual query against the Fider database to update
users.status. If the user deletes the account themselves status needs to be set to2. If an administrator bans the account, then status needs to be set to3.Of note, the Fider PostgreSQL database is stored on a remote server from the MyVideoGameList.com website...but I have setup access,
cypress.texas.linuxbox.ninjaon port 58761. Once we determine the names of the PostgreSQL username and password variables I will add the credentials to the.envfile.Implemented in commit
23b5ed7(Sync Fider account status on deletion and bans) and pushed toorigin/dev.Notes:
FIDER_DB_*env vars, defaulting tocypress.texas.linuxbox.ninja:58761.SyncFiderUserStatus, which updates Fiderusers.statusdirectly.2(deleted).3(blocked).lower(email), then username fallback usinglower(name). It does not match on the MVGL user id/reference.Verification:
vendor/bin/pint --dirty --format agentphp artisan test --compact tests/Feature/FiderUserStatusSyncTest.php tests/Feature/AccountDeletionCascadeTest.php tests/Feature/AdminUserProfileInfoTest.php tests/Feature/Settings/ProfileUpdateTest.php tests/Feature/Auth/RegistrationTest.php-> 69 passed, 562 assertionsgit diff --cached --check.env.local:select 1succeeded.users.email,users.name, andusers.statusexist.