-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Transition to using access_control_list
Vespa field for permissioning
#450
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
3aa4345
to
6eda5b8
Compare
6eda5b8
to
5003dcf
Compare
5003dcf
to
1538c0b
Compare
1538c0b
to
03ba5d6
Compare
DocumentByConnectorCredentialPair.connector_id == connector_id, | ||
DocumentByConnectorCredentialPair.credential_id == credential_id, | ||
document_ids: list[str], | ||
) -> Sequence[tuple[str, int]]: |
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.
some comment/description please
router = APIRouter(prefix="/manage") | ||
|
||
|
||
@router.patch("/promote-user-to-admin") |
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.
nice meme
from danswer.db.models import User | ||
|
||
|
||
router = APIRouter(prefix="/manage") |
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.
is this still best?
if user_id is None: | ||
return PUBLIC_DOCUMENT_SET | ||
|
||
return f"__USER_{user_id}" |
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.
nit: prefer having this be PERSONAL_DOCUMENT_SET.format(user_id) or something for consistency
ALLOWED_GROUPS: cross_connector_document_metadata_map[ | ||
document.id | ||
].allowed_user_groups, | ||
# give each document set "equal weighting" in the weightedset |
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.
Is this for upcoming feature of document-sets boosting?
If this is supported, how will we handle different personas or knowledge sets favoring different document sets?
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.
for future clarity, let's call them personas which have document sets (knowledge sets as a term is banned!)
ALLOWED_GROUPS: cross_connector_document_metadata_map[ | ||
document.id | ||
].allowed_user_groups, | ||
DOCUMENT_SETS: json.dumps(list(chunk.access.document_sets)), |
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.
add comment about performance issue
03ba5d6
to
43a5a51
Compare
43a5a51
to
f0109bd
Compare
@@ -55,6 +58,34 @@ class IndexChunk(DocAwareChunk): | |||
embeddings: ChunkEmbedding | |||
|
|||
|
|||
@dataclass | |||
class DocMetadataAwareIndexChunk(IndexChunk): |
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.
Note: could also attach this info to the document itself, but this doesn't play as well with our current setup
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.
Instead of the chunk or?
f0109bd
to
22e2aeb
Compare
22e2aeb
to
9b113f0
Compare
access_control_list
for permissioning
access_control_list
for permissioningaccess_control_list
Vespa field for permissioning
Is this still relevant? or is this covered by the other PR now? |
9b113f0
to
55fbd5c
Compare
Lays the framework for adding document sets.
allowed_users
/allowed_groups
from document indexes and usesaccess_control_list
insteadaccess
utility functions, this "module" be where all the logic related to computing a users access levels lives