-
Notifications
You must be signed in to change notification settings - Fork 46
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 GDPR-Export for user #2444
base: develop
Are you sure you want to change the base?
Conversation
app/Models/User.php
Outdated
$personalDataSelection | ||
->add('user.json', $user) | ||
->add('statuses.json', $this->statuses()->with('tags')->get()) | ||
->add('notifications.json', $this->notifications()->get()->toJson()) | ||
->add('likes.json', $this->likes()->get()->toJson()) | ||
->add('social_profile.json', $this->socialProfile()->with('mastodonserver')->get()) | ||
->add('event_suggestions.json', EventSuggestion::where('user_id', $this->id)->get()->toJson()) | ||
->add('events.json', Event::where('approved_by', $this->id)->get()->toJson()) | ||
->add('webhooks.json', $webhooks) | ||
->add( | ||
'webhook_creation_requests.json', | ||
WebhookCreationRequest::where('user_id', $this->id)->get()->toJson() | ||
) | ||
->add('tokens.json', TokenController::index($this)->toJson()) | ||
->add('ics_tokens.json', $this->icsTokens()->get()->toJson()) | ||
->add( | ||
'password_resets.json', | ||
DB::table('password_resets')->select(['email','created_at'])->where('email', $this->email)->get() | ||
) | ||
->add('apps.json', $this->oAuthClients()->get()->toJson()) | ||
->add('follows.json', DB::table('follows')->where('user_id', $this->id)->get()) | ||
->add('followings.json', DB::table('follows')->where('follow_id', $this->id)->get()) | ||
->add('blocks.json', DB::table('user_blocks')->where('user_id', $this->id)->get()) | ||
->add('blocked_by.json', DB::table('user_blocks')->where('blocked_id', $this->id)->get()) | ||
->add('mutes.json', DB::table('user_mutes')->where('user_id', $this->id)->get()) | ||
->add('muted_by.json', DB::table('user_mutes')->where('muted_id', $this->id)->get()) | ||
->add('follow_requests.json', DB::table('follow_requests')->where('user_id', $this->id)->get()) | ||
->add('follows_requests.json', DB::table('follow_requests')->where('follow_id', $this->id)->get()) | ||
->add('sessions.json', $this->sessions()->get()->toJson()) | ||
->add('home.json', $this->home()->get()->toJson()) | ||
->add('hafas_trips.json', DB::table('hafas_trips')->where('user_id', $this->id)->get()) | ||
->add('mentions.json', Mention::where('user_id', $this->id)->get()->toJson()) | ||
->add('roles.json', $this->roles()->get()->toJson()) | ||
->add( | ||
'activity_log.json', | ||
DB::table('activity_log')->where('causer_type', get_class($this))->where('causer_id', $this->id)->get() | ||
) | ||
->add('permissions.json', $this->permissions()->get()->toJson()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ich finde es langfristig gesehen etwas kritisch, wenn wir einfach DB Queries raw ausspucken. Später hinzugefügte Columns, die nicht exposed werden sollten (z.B. irgendwelche Keys o.ä.) werden hier sicher vergessen. Wäre es nicht sinnvoller das noch einmal durch die Resourcen zu jagen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternativ einfach ein ->select([...])
mit den gewünschten Columns, damit nichts falsches exposed wird.
# Conflicts: # .idea/php.xml # lang/de.json # lang/en.json # resources/vue/components/NotificationEntry.vue
# Conflicts: # .idea/php.xml # .idea/trwl.iml # app/Models/User.php # composer.lock
rather than email, showing bothConfigure Queue to not interfere with backup downtimeIs this still needed?