Skip to content
Snippets Groups Projects
  • Adam Williamson's avatar
    44e6066f
    Handle page protection having no expiry (#290) · 44e6066f
    Adam Williamson authored
    
    Issue #290 gives an example of a wiki with protected pages whose
    protection definitions have no 'expiry' key at all. This seems
    strange and, on a quick through the mediawiki code, difficult
    to achieve, but since there's a live site out there that does it,
    and mediawiki *does* seem to have at least some code to handle
    such cases (e.g. how the expiry shows as 'indefinite' in the
    page information), let's handle it too, by representing this as
    None.
    
    Signed-off-by: default avatarAdam Williamson <awilliam@redhat.com>
    44e6066f
    History
    Handle page protection having no expiry (#290)
    Adam Williamson authored
    
    Issue #290 gives an example of a wiki with protected pages whose
    protection definitions have no 'expiry' key at all. This seems
    strange and, on a quick through the mediawiki code, difficult
    to achieve, but since there's a live site out there that does it,
    and mediawiki *does* seem to have at least some code to handle
    such cases (e.g. how the expiry shows as 'indefinite' in the
    page information), let's handle it too, by representing this as
    None.
    
    Signed-off-by: default avatarAdam Williamson <awilliam@redhat.com>