サードパーティからも自身のロールを確認できるように

Close #9700
This commit is contained in:
syuilo 2023-01-25 19:34:10 +09:00
parent fc641c9b96
commit 5ffa106cc1

View file

@ -496,10 +496,10 @@ export class UserEntityService implements OnModuleInit {
showTimelineReplies: user.showTimelineReplies ?? falsy,
achievements: profile!.achievements,
loggedInDays: profile!.loggedInDates.length,
policies: this.roleService.getUserPolicies(user.id),
} : {}),
...(opts.includeSecrets ? {
policies: this.roleService.getUserPolicies(user.id),
email: profile!.email,
emailVerified: profile!.emailVerified,
securityKeysList: profile!.twoFactorEnabled