mirror of
https://github.com/apache/superset.git
synced 2026-04-07 18:35:15 +00:00
fix: use StrEnum type for GuestTokenResourceType to fix token parsing (#30042)
This commit is contained in:
@@ -14,12 +14,13 @@
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from enum import Enum
|
||||
from typing import Optional, TypedDict, Union
|
||||
|
||||
from flask_appbuilder.security.sqla.models import Role
|
||||
from flask_login import AnonymousUserMixin
|
||||
|
||||
from superset.utils.backports import StrEnum
|
||||
|
||||
|
||||
class GuestTokenUser(TypedDict, total=False):
|
||||
username: str
|
||||
@@ -27,7 +28,7 @@ class GuestTokenUser(TypedDict, total=False):
|
||||
last_name: str
|
||||
|
||||
|
||||
class GuestTokenResourceType(Enum):
|
||||
class GuestTokenResourceType(StrEnum):
|
||||
DASHBOARD = "dashboard"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user