Skip to content

Commit

Permalink
fix: use StrEnum type for GuestTokenResourceType to fix token parsing (
Browse files Browse the repository at this point in the history
  • Loading branch information
hao-zhuventures committed Aug 29, 2024
1 parent 606ddc3 commit e2c4435
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions superset/security/guest_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@
# 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
first_name: str
last_name: str


class GuestTokenResourceType(Enum):
class GuestTokenResourceType(StrEnum):
DASHBOARD = "dashboard"


Expand Down

0 comments on commit e2c4435

Please sign in to comment.