Skip to content

Commit

Permalink
Revert "fix(explore): let admin overwrite slice (apache#16290)" (apac…
Browse files Browse the repository at this point in the history
…he#16408)

This reverts commit d13b081.
  • Loading branch information
rusackas authored Aug 24, 2021
1 parent 564bc07 commit b5f2121
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default function PropertiesModal({
buttonStyle="primary"
// @ts-ignore
onClick={onSubmit}
disabled={submitting || !name}
disabled={!owners || submitting || !name}
cta
>
{t('Save')}
Expand Down
5 changes: 1 addition & 4 deletions superset/views/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@
get_error_msg,
get_user_roles,
handle_api_exception,
is_user_admin,
json_error_response,
json_errors_response,
json_success,
Expand Down Expand Up @@ -788,9 +787,7 @@ def explore( # pylint: disable=too-many-locals

# slc perms
slice_add_perm = security_manager.can_access("can_write", "Chart")
slice_overwrite_perm = (
is_owner(slc, g.user) or is_user_admin() if slc else False
)
slice_overwrite_perm = is_owner(slc, g.user) if slc else False
slice_download_perm = security_manager.can_access("can_csv", "Superset")

form_data["datasource"] = str(datasource_id) + "__" + cast(str, datasource_type)
Expand Down

0 comments on commit b5f2121

Please sign in to comment.