Skip to content

Commit e2c4435

Browse files
fix: use StrEnum type for GuestTokenResourceType to fix token parsing (apache#30042)
1 parent 606ddc3 commit e2c4435

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

superset/security/guest_token.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,21 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
from enum import Enum
1817
from typing import Optional, TypedDict, Union
1918

2019
from flask_appbuilder.security.sqla.models import Role
2120
from flask_login import AnonymousUserMixin
2221

22+
from superset.utils.backports import StrEnum
23+
2324

2425
class GuestTokenUser(TypedDict, total=False):
2526
username: str
2627
first_name: str
2728
last_name: str
2829

2930

30-
class GuestTokenResourceType(Enum):
31+
class GuestTokenResourceType(StrEnum):
3132
DASHBOARD = "dashboard"
3233

3334

0 commit comments

Comments
 (0)