Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOIs for restricted records: configure tombstone page for the doi link #2685

Closed

Comments

@anikachurilova
Copy link
Member

Right now, the tombstone page for restricted records with existing DOI appears only for the link /records/<id>.
What needs to be done: handle the same behavior for the link /doi/<doi>/<id>

@anikachurilova anikachurilova self-assigned this May 30, 2024
@anikachurilova anikachurilova moved this to In Progress in 2024/Q4 May 30, 2024
@ntarocco ntarocco moved this from In Progress to Todo dev in 2024/Q4 Jun 24, 2024
@zguillen
Copy link

Hello all - I had to quickly tackle this bug since we're seeing it in our RDM 9.1 prod instance. I realize it's not cool to use the model class from UI but the current service implementation didn't wrap the PersistentIdentifier class methods I needed. Hopefully this will at least help out whoever tackles this bug for real:

in invenio_app_rdm/records_ui/views/decorators.py

change this method to include the try/except block:

def pass_record_from_pid(f):
    """Decorate a view to pass the record from a pid."""

    @wraps(f)
    def view(*args, **kwargs):
        scheme = kwargs.get("pid_scheme")
        pid_value = kwargs.get("pid_value")

        try:
            record = service().pids.resolve(
                g.identity,
                pid_value,
                scheme,
            )
        # MSD-LIVE CHANGE catch the exception and then see if it's because the rec was deleted
        except NoResultFound:
            from invenio_pidstore.models import PersistentIdentifier
            from invenio_pidstore.errors import PIDDeletedError

            doi_pid = PersistentIdentifier.get(scheme, pid_value)

            record_uuid = doi_pid.object_uuid
            rec_pid = PersistentIdentifier.get_by_object(
                pid_type="recid", object_uuid=str(record_uuid), object_type="rec"
            )
            if rec_pid.is_deleted():
                raise PIDDeletedError(rec_pid, None)

        kwargs["record"] = record
        return f(**kwargs)

    return view

@anikachurilova anikachurilova self-assigned this Jul 19, 2024
@anikachurilova anikachurilova moved this to In progress in Sprint Q1/2025 Jul 19, 2024
@ntarocco ntarocco moved this from Todo dev to In Progress in 2024/Q4 Jul 19, 2024
anikachurilova added a commit to anikachurilova/invenio-records-resources that referenced this issue Jul 19, 2024
anikachurilova added a commit to anikachurilova/invenio-rdm-records that referenced this issue Jul 19, 2024
@anikachurilova anikachurilova moved this from In progress to In review in Sprint Q1/2025 Jul 19, 2024
@anikachurilova anikachurilova removed their assignment Jul 19, 2024
@anikachurilova anikachurilova moved this from In Progress to To review in 2024/Q4 Jul 19, 2024
anikachurilova added a commit to anikachurilova/invenio-rdm-records that referenced this issue Jul 23, 2024
@ntarocco ntarocco moved this from In review to To release 🤖 in Sprint Q1/2025 Jul 25, 2024
@ntarocco ntarocco moved this from To review to To deploy in 2024/Q4 Jul 25, 2024
slint pushed a commit to inveniosoftware/invenio-rdm-records that referenced this issue Jul 30, 2024
slint added a commit to zenodo/zenodo-rdm that referenced this issue Aug 2, 2024
📁 invenio-accounts (5.0.1 -> 5.1.0 🌈)

    release: v5.1.0
    feat(cli): add command for group creation

    * add opensearch, necessary for the invenio-users-resources package
    cli: add command for domain create

📁 invenio-records-permissions (0.19.2 -> 0.20.0 🌈)

    📦 release: v0.20.0
    record: add create_or_update_many permission

    * closes inveniosoftware/invenio-vocabularies#353

📁 invenio-records-resources (6.1.0 -> 6.2.0 🌈)

    📦 release: v6.2.0
    ci: use reusable workflows
    service: add ServiceBulkListResult

    * Adds ServiceBulkListResult and ServiceBulkItemResult
    service: add create update many

    * closes inveniosoftware/invenio-vocabularies#353
    📦 release: v6.1.1
    services: clean up the code

    * closes inveniosoftware/invenio-app-rdm#2685

📁 invenio-requests (4.5.1 -> 4.6.0 🌈)

    release: v4.6.0
    comments: fix jumping cursor

    * these changes depending on thins PR: inveniosoftware/react-invenio-forms#244
    * align porperty naming as RichEditior wrongly named value instead of initialValue
    * change onchange to onEditorChange as recommended in the tinymce docs.
    * Change the prop value to inputValue, as the name value seems to conflict with other elements, causing the input text in edit mode to behave oddly.
    ui: [#855] add community membership request label type

📁 invenio-search (2.3.1 -> 2.4.0 🌈)

    📦 release: v2.4.0
    cli: add "--check/--no-check" flag for mapping updates
    ci: use reusable workflows
    ext: report attempted mappings update on failure (inveniosoftware/invenio-search#224)

📁 invenio-theme (3.2.0 -> 3.3.0 🌈)

    📦 release: v3.3.0
    templates: add meta robot tags

    * Generate robots meta tags from the `THEME_META_ROBOT_TAGS` config or
      exlicitly set via the `meta_robot_tags` Jinja variable.
    header:  increase invenio menu z-index

📁 invenio-users-resources (5.3.0 -> 5.3.1 🐛)

    release: v5.3.1
    config: Update records_html link

    * The records_html link in the UsersServiceConfig class has been updated to include the "parent.access.owned_by.user" query parameter.
    * Add tests for admin links
    * Add tests for admin visibility links
    moderation: fix admin record / draft links

    * Fix admin user lists show no results
    * Closes inveniosoftware/invenio-app-rdm#2721
    * No need to change moderation links as they are functional
alejandromumo added a commit to alejandromumo/zenodo-rdm that referenced this issue Aug 7, 2024
📁 invenio-app-rdm (13.0.0b0.dev10 -> 13.0.0b0.dev11 )

    📦 release: v13.0.0b0.dev11
    deposit: pass record to publish button
    CI: switch to centralised workflows
    templates: landing page custom field macro refactor
    custom_fields: allow to search vocab

    * closes CERNDocumentServer/cds-rdm#180
    requests: fix small ui bugs

    * closes CERNDocumentServer/cds-rdm#176
    migration: add vocabulary updates
    migration: add parent doi handling

    * list points which were tested

📁 invenio-banners (3.0.2 -> 3.1.0 🌈)

    📦 release: v3.1.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598

📁 invenio-communities (14.5.1 -> 14.5.2 🐛)

    📦 release: v14.5.2
    user_moderation: dispatch Celery tasks for each community operation
    fix(logo): not fully deleted

    * logo file hasn't been deleted. this prevented a new file upload,
      because of an sqlalchemy.exc.IntegrityError:
      (psycopg2.errors.UniqueViolation) error.
    subcommunities: fix missing double-quote in email templates

📁 invenio-i18n (2.1.1 -> 2.1.2 🐛)

    release: v2.1.2
    ext: allow BABEL_DEFAULT_LOCALE overridability

📁 invenio-pages (4.0.1 -> 4.1.0 🌈)

    📦 release: v4.1.0
    ci: use reusable workflows
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598
    setup: update dependencies

📁 invenio-rdm-records (11.5.0 -> 11.6.0 🌈)

    📦 release: v11.6.0
    creatibutors: fix buttons
    permissions: change error handler for resolving pid permission denied

    * closes inveniosoftware/invenio-app-rdm#2685
    record inclusion: use system identity to accept inclusion request when can_include_directly

    * closes CERNDocumentServer/cds-rdm#176
    user_moderation: improve DB queries and use Celery tasks
    fix: use index to distinguish type

    * the problem with is_published is that drafts created from records will
      not be recogniced correctly

    * using the index is a valid solution but it is not a nice
      implementation.
    results: added support for drafts

    * Added support for drafts in the results list
    fix(community): set branding

    * the set branding didn't work at all. it didn't work for rebranding if
      a default already exists and it didn't work if no branding exists at
      all.

    * the default property of the CommunitiesRelationManager needs a string.
      it can't handle a dict.

📁 invenio-records-ui (1.2.0 -> 1.2.1 🐛)

    release: v1.2.1
    views: add __qualname__ to partial wrapped view func
    config: fix extract messages err
    i18n-global: add compile-catalog fuzzy (inveniosoftware/invenio-records-ui#100)

    Refs inveniosoftware/invenio-i18n#103
    fix change sh to bash to use newer syntax
    fix res.location changed structure, localhost not more part of it
    fix add missing configuration variables

    NOTE:
    the bugfix seams as not complete. the real bug should be fixed somewhere else.
    it was too easy to add only those variables.
    global: clean test infrastructure
    increase minimal python version to 3.7
    move check_manifest configuration to setup.cfg.

    concentrate the configuration of all calls in one place
    fix docs compatibilty problem with Sphinx>=5.0.0
    add .git-blame-ignore-revs
    migrate to use black as opinionated auto formater
    migrate setup.py to setup.cfg

📁 invenio-search (2.4.0 -> 2.4.1 🐛)

    release: v2.4.1
    fix: avoid closing db session

    Using `with self.app.app_context():` closes the current DB session on
    `__exit__`, causing a `sqlalchemy.orm.exc.DetachedInstanceError` when
    accessing any property of the object expected in the session. This error
    occurs only the first time index_templates are loaded, such as when
    indexing the very first record.
    Subsequent accesses won't trigger this issue due to the @cached_property,
    preventing reloading of index_templates.
    ci: upgrade tests

📁 invenio-vocabularies (4.2.0 -> 4.3.0 🌈)

    📦 release: v4.3.0
    names: make names_exclude_regex configurable
    setup: add regex as dependency
    names: validate entry full names
    ci: use reusable workflows
    names: keep original datastream config

    * allow to pass since
    names: update writer service call
    names: add orcid public data sync

    * Adds delete all values of a vocab to CLI
alejandromumo added a commit to zenodo/zenodo-rdm that referenced this issue Aug 7, 2024
📁 invenio-app-rdm (13.0.0b0.dev10 -> 13.0.0b0.dev11 )

    📦 release: v13.0.0b0.dev11
    deposit: pass record to publish button
    CI: switch to centralised workflows
    templates: landing page custom field macro refactor
    custom_fields: allow to search vocab

    * closes CERNDocumentServer/cds-rdm#180
    requests: fix small ui bugs

    * closes CERNDocumentServer/cds-rdm#176
    migration: add vocabulary updates
    migration: add parent doi handling

    * list points which were tested

📁 invenio-banners (3.0.2 -> 3.1.0 🌈)

    📦 release: v3.1.0
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598

📁 invenio-communities (14.5.1 -> 14.5.2 🐛)

    📦 release: v14.5.2
    user_moderation: dispatch Celery tasks for each community operation
    fix(logo): not fully deleted

    * logo file hasn't been deleted. this prevented a new file upload,
      because of an sqlalchemy.exc.IntegrityError:
      (psycopg2.errors.UniqueViolation) error.
    subcommunities: fix missing double-quote in email templates

📁 invenio-i18n (2.1.1 -> 2.1.2 🐛)

    release: v2.1.2
    ext: allow BABEL_DEFAULT_LOCALE overridability

📁 invenio-pages (4.0.1 -> 4.1.0 🌈)

    📦 release: v4.1.0
    ci: use reusable workflows
    http headers: use and adjust vnd.inveniordm.v1+json http accept header

    * closes zenodo/rdm-project#598
    setup: update dependencies

📁 invenio-rdm-records (11.5.0 -> 11.6.0 🌈)

    📦 release: v11.6.0
    creatibutors: fix buttons
    permissions: change error handler for resolving pid permission denied

    * closes inveniosoftware/invenio-app-rdm#2685
    record inclusion: use system identity to accept inclusion request when can_include_directly

    * closes CERNDocumentServer/cds-rdm#176
    user_moderation: improve DB queries and use Celery tasks
    fix: use index to distinguish type

    * the problem with is_published is that drafts created from records will
      not be recogniced correctly

    * using the index is a valid solution but it is not a nice
      implementation.
    results: added support for drafts

    * Added support for drafts in the results list
    fix(community): set branding

    * the set branding didn't work at all. it didn't work for rebranding if
      a default already exists and it didn't work if no branding exists at
      all.

    * the default property of the CommunitiesRelationManager needs a string.
      it can't handle a dict.

📁 invenio-records-ui (1.2.0 -> 1.2.1 🐛)

    release: v1.2.1
    views: add __qualname__ to partial wrapped view func
    config: fix extract messages err
    i18n-global: add compile-catalog fuzzy (inveniosoftware/invenio-records-ui#100)

    Refs inveniosoftware/invenio-i18n#103
    fix change sh to bash to use newer syntax
    fix res.location changed structure, localhost not more part of it
    fix add missing configuration variables

    NOTE:
    the bugfix seams as not complete. the real bug should be fixed somewhere else.
    it was too easy to add only those variables.
    global: clean test infrastructure
    increase minimal python version to 3.7
    move check_manifest configuration to setup.cfg.

    concentrate the configuration of all calls in one place
    fix docs compatibilty problem with Sphinx>=5.0.0
    add .git-blame-ignore-revs
    migrate to use black as opinionated auto formater
    migrate setup.py to setup.cfg

📁 invenio-search (2.4.0 -> 2.4.1 🐛)

    release: v2.4.1
    fix: avoid closing db session

    Using `with self.app.app_context():` closes the current DB session on
    `__exit__`, causing a `sqlalchemy.orm.exc.DetachedInstanceError` when
    accessing any property of the object expected in the session. This error
    occurs only the first time index_templates are loaded, such as when
    indexing the very first record.
    Subsequent accesses won't trigger this issue due to the @cached_property,
    preventing reloading of index_templates.
    ci: upgrade tests

📁 invenio-vocabularies (4.2.0 -> 4.3.0 🌈)

    📦 release: v4.3.0
    names: make names_exclude_regex configurable
    setup: add regex as dependency
    names: validate entry full names
    ci: use reusable workflows
    names: keep original datastream config

    * allow to pass since
    names: update writer service call
    names: add orcid public data sync

    * Adds delete all values of a vocab to CLI
@kpsherva kpsherva moved this from To release 🤖 to To deploy in Sprint Q1/2025 Aug 9, 2024
monotasker pushed a commit to MESH-Research/invenio-rdm-records that referenced this issue Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
2 participants