fix: use StrEnum type for GuestTokenResourceType to fix token parsing (#30042)
This commit is contained in:
parent
606ddc3181
commit
e2c4435cab
|
|
@ -14,12 +14,13 @@
|
||||||
# KIND, either express or implied. See the License for the
|
# KIND, either express or implied. See the License for the
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
from enum import Enum
|
|
||||||
from typing import Optional, TypedDict, Union
|
from typing import Optional, TypedDict, Union
|
||||||
|
|
||||||
from flask_appbuilder.security.sqla.models import Role
|
from flask_appbuilder.security.sqla.models import Role
|
||||||
from flask_login import AnonymousUserMixin
|
from flask_login import AnonymousUserMixin
|
||||||
|
|
||||||
|
from superset.utils.backports import StrEnum
|
||||||
|
|
||||||
|
|
||||||
class GuestTokenUser(TypedDict, total=False):
|
class GuestTokenUser(TypedDict, total=False):
|
||||||
username: str
|
username: str
|
||||||
|
|
@ -27,7 +28,7 @@ class GuestTokenUser(TypedDict, total=False):
|
||||||
last_name: str
|
last_name: str
|
||||||
|
|
||||||
|
|
||||||
class GuestTokenResourceType(Enum):
|
class GuestTokenResourceType(StrEnum):
|
||||||
DASHBOARD = "dashboard"
|
DASHBOARD = "dashboard"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue