-
Notifications
You must be signed in to change notification settings - Fork 21
(PR-SERIES-P6) [ENHANCEMENT]: Implement Access Validation #583
Conversation
8734184
to
fe32c1d
Compare
jaclang/plugin/default.py
Outdated
conn_edge.__jac__.save() | ||
_right.save() | ||
_left.save() | ||
if _left.has_connect_access(_right): |
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.
This is a question for how we handle permission in general.. if access validation fails, should we throw some kind of exception? even silently.
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.
currently, we just skip/ignore the execution
should we throw exception instead?
jaclang/runtimelib/architype.py
Outdated
def whitelist_roots(self, whitelist: bool = True) -> None: | ||
"""Toggle root whitelist/blacklist.""" | ||
if whitelist != self.access.roots.whitelist: | ||
self.access.roots.whitelist = whitelist |
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.
If we are going to keep both whitelist/blacklist, this should be part of the Access
class.
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.
I'm not sure what you mean as it's already part of Access class
jaclang/runtimelib/context.py
Outdated
self.__entry__ = self.init_anchor(self.__entry__, self.root) | ||
case _: | ||
self.__entry__ = self.root | ||
return self.__entry__ |
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.
Need to understand this...
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.
Lazy loading entry node as it's not yet available before jac_import
the only available NodeArchitype before jac_import is Root class
d516a64
to
44b823f
Compare
9997e3e
to
2cd84b6
Compare
jaclang/runtimelib/architype.py
Outdated
): | ||
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) |
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.
This is interesting...do i need access to the target node in order to access the edge connecting to it?
No description provided.