-
Notifications
You must be signed in to change notification settings - Fork 36
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 Confluence source permission metadata #434
Conversation
c1882a1
to
38214e1
Compare
43fe08f
to
6a803af
Compare
logger.debug(f"Could not retrieve permissions for space {space_id}: {e}") | ||
return None | ||
|
||
@requires_dependencies(["requests"], extras="confluence") |
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.
You refactored this to no longer use requests. I guess it's fine to still use requests and put the import inline.
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.
either works right? I went ahead with catching a generic exception since we really don't want this to causing jobs to err, so ill remove this dep
Retrieves permission data from each Confluence document and its parent space, normalizes the format (see below), and adds it to the
permissions_data
field in the metadata.The output format is a dictionary of roles (read, update, delete) with a lists of "groups" and users" having that permission under each.
The output type is currently wrapped in a list to match the existing FileDataSourceMetadata type definition shared by all connectors. TODO to update that as the other connectors get normalized
The current implementation limits the results to approximately 250 permission entities.
Further improvement items:
This PR also clarifies "space_id" (int) vs "space_key" (str). The previous
space_id
used throughout the code was actually the space key. Does not change the user facing experience (the space_id field returned in metadata is still the space key as before)