Unverified Commit 04433828 authored by davelopez's avatar davelopez
Browse files

Fix RDM token access for user-defined file sources

The user context was needed in the old admin-provided file sources to evaluate templated values.
However, the user context is not needed when using user-defined file sources as the templated values are already resolved when instancing the file source.
parent c142228e
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -201,11 +201,8 @@ class RDMFilesSource(BaseFilesSource):
        return effective_props

    def get_authorization_token(self, user_context: OptionalUserContext) -> Optional[str]:
        token = None
        if user_context:
        effective_props = self._serialization_props(user_context)
            token = effective_props.get("token")
        return token
        return effective_props.get("token")

    def get_public_name(self, user_context: OptionalUserContext) -> Optional[str]:
        effective_props = self._serialization_props(user_context)