Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

(PR-SERIES-P6) [ENHANCEMENT]: Implement Access Validation #583

Merged
merged 6 commits into from
Aug 31, 2024

Conversation

amadolid
Copy link
Collaborator

No description provided.

@amadolid amadolid requested review from ypkang and marsninja August 21, 2024 17:32
@amadolid amadolid force-pushed the pr-series/6 branch 2 times, most recently from 8734184 to fe32c1d Compare August 21, 2024 18:14
@amadolid amadolid marked this pull request as ready for review August 21, 2024 18:24
conn_edge.__jac__.save()
_right.save()
_left.save()
if _left.has_connect_access(_right):
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a question for how we handle permission in general.. if access validation fails, should we throw some kind of exception? even silently.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

currently, we just skip/ignore the execution

should we throw exception instead?

jaclang/runtimelib/architype.py Outdated Show resolved Hide resolved
def whitelist_roots(self, whitelist: bool = True) -> None:
"""Toggle root whitelist/blacklist."""
if whitelist != self.access.roots.whitelist:
self.access.roots.whitelist = whitelist
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are going to keep both whitelist/blacklist, this should be part of the Access class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure what you mean as it's already part of Access class

jaclang/runtimelib/architype.py Show resolved Hide resolved
jaclang/runtimelib/architype.py Outdated Show resolved Hide resolved
jaclang/runtimelib/context.py Show resolved Hide resolved
jaclang/runtimelib/context.py Show resolved Hide resolved
self.__entry__ = self.init_anchor(self.__entry__, self.root)
case _:
self.__entry__ = self.root
return self.__entry__
Copy link
Contributor

Choose a reason for hiding this comment

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

Need to understand this...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Lazy loading entry node as it's not yet available before jac_import

the only available NodeArchitype before jac_import is Root class

jaclang/runtimelib/memory.py Show resolved Hide resolved
jaclang/runtimelib/architype.py Outdated Show resolved Hide resolved
@amadolid amadolid force-pushed the pr-series/5 branch 8 times, most recently from d516a64 to 44b823f Compare August 28, 2024 18:31
@amadolid amadolid force-pushed the pr-series/6 branch 3 times, most recently from 9997e3e to 2cd84b6 Compare August 28, 2024 21:11
Base automatically changed from pr-series/5 to main August 29, 2024 18:44
jaclang/plugin/default.py Show resolved Hide resolved
jaclang/runtimelib/architype.py Show resolved Hide resolved
):
ret_edges.append(anchor.architype)
if (
dir in [EdgeDir.IN, EdgeDir.ANY]
and self == target
and (not target_obj or source.architype in target_obj)
and target.has_read_access(source)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is interesting...do i need access to the target node in order to access the edge connecting to it?

jaclang/runtimelib/architype.py Outdated Show resolved Hide resolved
@marsninja marsninja merged commit 3a356f7 into main Aug 31, 2024
4 checks passed
@marsninja marsninja deleted the pr-series/6 branch August 31, 2024 14:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants