mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
fix(packages): Fixing users packages (#18973)
* Fixing users packages * Linting me() fn * Fixing tests / moving packages * Fixing imports
This commit is contained in:
@@ -50,7 +50,6 @@ from superset.extensions import (
|
||||
)
|
||||
from superset.security import SupersetSecurityManager
|
||||
from superset.typing import FlaskResponse
|
||||
from superset.users.api import CurrentUserRestApi
|
||||
from superset.utils.core import pessimistic_connection_handling
|
||||
from superset.utils.log import DBEventLogger, get_event_logger_from_cfg_value
|
||||
|
||||
@@ -195,6 +194,7 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
|
||||
TabStateView,
|
||||
)
|
||||
from superset.views.tags import TagView
|
||||
from superset.views.users.api import CurrentUserRestApi
|
||||
|
||||
#
|
||||
# Setup API views
|
||||
|
||||
17
superset/views/users/__init__.py
Normal file
17
superset/views/users/__init__.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
@@ -31,7 +31,7 @@ class CurrentUserRestApi(BaseApi):
|
||||
|
||||
@expose("/", methods=["GET"])
|
||||
@safe
|
||||
def me(self) -> Response:
|
||||
def get_me(self) -> Response:
|
||||
"""Get the user object corresponding to the agent making the request
|
||||
---
|
||||
get:
|
||||
@@ -905,7 +905,7 @@ class TestRolePermission(SupersetTestCase):
|
||||
["LocaleView", "index"],
|
||||
["AuthDBView", "login"],
|
||||
["AuthDBView", "logout"],
|
||||
["CurrentUserRestApi", "me"],
|
||||
["CurrentUserRestApi", "get_me"],
|
||||
["Dashboard", "embedded"],
|
||||
["R", "index"],
|
||||
["Superset", "log"],
|
||||
|
||||
17
tests/integration_tests/users/__init__.py
Normal file
17
tests/integration_tests/users/__init__.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
Reference in New Issue
Block a user