rusackas commented on code in PR #43389:
URL: https://github.com/apache/superset/pull/43389#discussion_r3845145159
##########
superset/commands/semantic_layer/create.py:
##########
@@ -92,9 +95,15 @@ def run(self) -> Model:
def validate(self) -> None:
layer_uuid: str = self._properties.get("semantic_layer_uuid", "")
- if not SemanticLayerDAO.find_by_uuid(layer_uuid):
+ layer = SemanticLayerDAO.find_by_uuid(layer_uuid)
+ if not layer:
raise SemanticLayerNotFoundError()
+ try:
+ security_manager.raise_for_editorship(layer)
Review Comment:
Good catch, and this is already covered in `8d53c2909`,
`current_user_can_modify_object` falls back to the object's creator when
there's no editors relationship. Resolving.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]