Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
2
Share

ShareLinkService

Functions
find_by_token_and_check @classmethod
token : str
Return type : ShareLink
find_by_token_and_check_validity @classmethod

Method that find a shared entity link by its token and check if it is valid

token : str
Return type : ShareLink
find_by_type_and_entity @classmethod

Method that find a shared entity link by its entity id and type

entity_type : ShareLinkEntityType
entity_id : str
link_type : ShareLinkType
Return type : gws_core.share.share_link.ShareLink | None
resource_is_app @classmethod

Return True if the shared entity is an app resource.

entity_type : ShareLinkEntityType
entity_id : str
Return type : bool
resource_is_authenticated_app @classmethod

Return True if the shared entity is an app that requires authentication.

Used to forbid PUBLIC share links on such apps: a PUBLIC link authenticates every visitor as the system user (see AuthorizationService.auth_share_link_from_token), which would bypass the app's authentication. AUTHENTICATED apps must be shared with a SPACE link (real per-user auth) or opened through the launcher gateway.

entity_type : ShareLinkEntityType
entity_id : str
Return type : bool
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.