예제 #1
0
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))
예제 #2
0
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'))
예제 #3
0
def delete(id):
    api.delete(f'/role/{id}')
    flash(f'Role {id} has been deleted.', category='success')
    return redirect(url_for('.index'))
예제 #4
0
def delete(id):
    api.delete(f'/collection/{id}')
    flash(f'Collection {id} has been deleted.', category='success')
    return redirect(url_for('.index'))
예제 #5
0
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')
예제 #6
0
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')
예제 #7
0
def delete(id):
    api.delete(f'/provider/{id}')
    flash(f'Provider {id} has been deleted.', category='success')
    return redirect(url_for('.index'))