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: add user group db schema support #1144

Merged
merged 8 commits into from
Feb 7, 2023

Conversation

jczhong84
Copy link
Collaborator

  • update db schema to support user group
  • add a new component to display user group info
    Snip20230203_1

querybook/server/datasources/user.py Outdated Show resolved Hide resolved
querybook/server/datasources/user.py Outdated Show resolved Hide resolved
querybook/server/datasources/user.py Outdated Show resolved Hide resolved
querybook/server/models/user.py Outdated Show resolved Hide resolved
querybook/server/models/user.py Show resolved Hide resolved
Group members
</AccentText>
<div className="members-container">
{members.map((m) => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

put a limit on how many member to show

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should we provide "show more" to allow them to view all the members?

@czgu
Copy link
Collaborator

czgu commented Feb 7, 2023

@jczhong84 there is another concern that i just realized. With this change, users will be able to add "groups" as editors of datadocs. For now, can you disable groups being indexed into elasticsearch?



## Load Users and Group
If you're not using the default username/password authentication, you probably need to sync the users/groups regularly from your organization's sysmtem into Querybook. To do this, you can
Copy link
Collaborator

Choose a reason for hiding this comment

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

oauth/ldap auth both supports auto-creation of users. I guess you can mention groups can only be sync'ed now and cannot be created in UI

A user or a group can have below properties
- username: It is the unique iendifiter of a user or a group.
- fullname: Full name or display name of a user or a group
- password: Password of a user. Only applies to a user.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Only applies to users when using default user/password auth

- fullname: Full name or display name of a user or a group
- password: Password of a user. Only applies to a user.
- email: Email of a user or a group.
- profile_img: Profile image of a user or a group.
Copy link
Collaborator

Choose a reason for hiding this comment

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

profile image url

querybook/server/models/user.py Show resolved Hide resolved
* this constant controls the maximum number
* of members to show in the user group popover
*/
export const MAX_USER_GROUP_MEMBERS_TO_SHOW = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

1 is too low?


roles?: number[];

// Properties below are only available when is_group is true
properties?: {
Copy link
Collaborator

Choose a reason for hiding this comment

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

properties is no longer optional

We use the `User` model to represent a user or a group.

A user or a group can have below properties
- username: It is the unique iendifiter of a user or a group.
Copy link
Collaborator

Choose a reason for hiding this comment

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

identifier

czgu
czgu previously approved these changes Feb 7, 2023
## Create/Load Users and Group
For users
- default user/password authentication: people can sign up as a new user on UI.
- auth/ldap authentication: they both support auto-creation of users.
Copy link
Collaborator

Choose a reason for hiding this comment

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

oauth

@czgu czgu merged commit 4734e01 into pinterest:master Feb 7, 2023
@jczhong84 jczhong84 deleted the feat/usergroup branch April 7, 2023 00:41
rohan-sh1 pushed a commit to CAI-TECHNOLOGIES/cai-ext-db-explorer that referenced this pull request Apr 11, 2023
* feat: add user group db schema support

* comments

* disable user group indexing

* addto sidebar

* fix linter

* more comments

* fix linter

* typo
aidenprice pushed a commit to arrowtail-precision/querybook that referenced this pull request Jan 3, 2024
* feat: add user group db schema support

* comments

* disable user group indexing

* addto sidebar

* fix linter

* more comments

* fix linter

* typo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants