mirror of
https://github.com/wassname/talk.git
synced 2026-08-05 13:30:26 +08:00
[CORL-761] stream-side account tab for sso (#2834)
* move download comments to my comments tab * only show download comments if available * move ignored users management to same tab as notifications, rename to preferences * fix query and ts defs * add url to jwt * make account tab go to external url if provided * ensure url is an optional jwt field * update tabs for stream profile * update classnames for tabs * fix tests
This commit is contained in:
@@ -30,11 +30,12 @@ export function getSSOProfile(user: Pick<User, "profiles">) {
|
||||
|
||||
export function needsSSOUpdate(
|
||||
token: SSOUserProfile,
|
||||
user: Pick<User, "email" | "username" | "badges" | "role">
|
||||
user: Pick<User, "email" | "username" | "badges" | "role" | "ssoURL">
|
||||
) {
|
||||
return (
|
||||
user.email !== token.email ||
|
||||
user.username !== token.username ||
|
||||
(user.ssoURL && user.ssoURL !== token.url) ||
|
||||
(token.role && user.role !== token.role) ||
|
||||
!isEqual(user.badges, token.badges)
|
||||
);
|
||||
|
||||
@@ -392,6 +392,11 @@ export interface User extends TenantResource {
|
||||
*/
|
||||
badges?: string[];
|
||||
|
||||
/**
|
||||
* ssoURL is the url where a user can manage their sso account
|
||||
*/
|
||||
ssoURL?: string;
|
||||
|
||||
/**
|
||||
* emailVerificationID is used to store state regarding the verification state
|
||||
* of an email address to prevent replay attacks.
|
||||
@@ -485,6 +490,7 @@ export interface FindOrCreateUserInput {
|
||||
avatar?: string;
|
||||
email?: string;
|
||||
badges?: string[];
|
||||
ssoURL?: string;
|
||||
emailVerified?: boolean;
|
||||
role: GQLUSER_ROLE;
|
||||
profile: Profile;
|
||||
|
||||
Reference in New Issue
Block a user