def untag_embargo(id, tag_instance_id): api_route = '/record/' if ODPScope.RECORD_ADMIN in g.user_permissions: api_route += 'admin/' api.delete(f'{api_route}{id}/tag/{tag_instance_id}') flash(f'{ODPRecordTag.EMBARGO} tag has been removed.', category='success') return redirect(url_for('.view', id=id))
def delete(id): api_route = '/record/' if ODPScope.RECORD_ADMIN in g.user_permissions: api_route += 'admin/' api.delete(api_route + id) flash(f'Record {id} has been deleted.', category='success') return redirect(url_for('.index'))
def delete(id): api.delete(f'/role/{id}') flash(f'Role {id} has been deleted.', category='success') return redirect(url_for('.index'))
def delete(id): api.delete(f'/collection/{id}') flash(f'Collection {id} has been deleted.', category='success') return redirect(url_for('.index'))
def untag_frozen(id): collection = api.get(f'/collection/{id}') if frozen_tag := get_tag_instance(collection, ODPCollectionTag.FROZEN): api.delete(f'/collection/admin/{id}/tag/{frozen_tag["id"]}') flash(f'{ODPCollectionTag.FROZEN} tag has been removed.', category='success')
def untag_ready(id): collection = api.get(f'/collection/{id}') if ready_tag := get_tag_instance(collection, ODPCollectionTag.READY): api.delete(f'/collection/admin/{id}/tag/{ready_tag["id"]}') flash(f'{ODPCollectionTag.READY} tag has been removed.', category='success')
def delete(id): api.delete(f'/provider/{id}') flash(f'Provider {id} has been deleted.', category='success') return redirect(url_for('.index'))