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: Added datadoc and list access permissions for user groups #1297

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

Conversation

jij1949
Copy link
Contributor

@jij1949 jij1949 commented Jul 19, 2023

This PR takes the already implemented user groups and expands them so that they actually grant permissions to their members. These user groups can be assigned as editors for datadocs or lists, and can have read or write privileges. Groups can also be members of other groups, and therefore groups can also inherit permissions from other groups which they will then pass on to their members.

In addition, a user will always have the access level of its most permissive permission. For example, if a user is directly added to a datadoc with read-only permissions but is also a member of a group with edit permissions, the user will have edit permissions until the group is removed or the group permissions revoked.

Screenshot 2023-07-19 at 3 24 20 PM

@jij1949 jij1949 marked this pull request as ready for review July 19, 2023 22:25
@czgu
Copy link
Collaborator

czgu commented Aug 14, 2023

wow this is awesome!

Copy link
Collaborator

@jczhong84 jczhong84 left a comment

Choose a reason for hiding this comment

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

could you also update the version in package.json? Also it will be nice to add some docs for this new feature in the docs_website

querybook/server/logic/generic_permission.py Outdated Show resolved Hide resolved
querybook/server/logic/generic_permission.py Outdated Show resolved Hide resolved
querybook/server/logic/board_permission.py Outdated Show resolved Hide resolved
querybook/server/logic/datadoc_permission.py Outdated Show resolved Hide resolved
querybook/server/logic/user.py Show resolved Hide resolved
querybook/webapp/lib/data-doc/datadoc-permission.ts Outdated Show resolved Hide resolved
Copy link

@anacltd anacltd left a comment

Choose a reason for hiding this comment

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

awesome work!

Copy link
Collaborator

@jczhong84 jczhong84 left a comment

Choose a reason for hiding this comment

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

@jij1949 thanks for updating the PR. It looks good to me overall. Put some more comments.

Could you also update the version in package.json as well? thanks!

querybook/server/logic/board_permission.py Outdated Show resolved Hide resolved
querybook/server/logic/datadoc_permission.py Outdated Show resolved Hide resolved
querybook/server/logic/board_permission.py Outdated Show resolved Hide resolved
querybook/server/logic/generic_permission.py Outdated Show resolved Hide resolved
querybook/webapp/redux/board/selector.ts Outdated Show resolved Hide resolved
querybook/webapp/redux/dataDoc/selector.ts Outdated Show resolved Hide resolved
@jczhong84
Copy link
Collaborator

lgtm. @jij1949 thanks for the updates! could you resolve the conflicts?

@czgu do you have any other comments or concern of this feature?

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.

4 participants