Skip to content

reindex claims when we detect change in the authorization  #43

@romanchyla

Description

@romanchyla

We do it when 'authorization' is removed from the profile; however it should be also done when authorization is granted. But I have to think about ways to throttle/prevent abuse - it could generate undesirated load if we always reindex everything

example where claim moved from 'user' to 'other'

orcid_pipeline=> select * from change_log where key like '%0000-0001-7917-3892%';
 id  |          created           |                      key                       |                    oldvalue                     |                    newvalue                     
-----+----------------------------+------------------------------------------------+-------------------------------------------------+-------------------------------------------------
 561 | 2017-09-20 01:26:59.773836 | 0000-0001-7917-3892:update:current_affiliation | "Department of Astronomy, University of Geneva" | null
 562 | 2017-09-20 01:26:59.774484 | 0000-0001-7917-3892:update:authorized          | true                                            | null
 811 | 2017-09-20 03:16:55.804883 | 0000-0001-7917-3892:update:authorized          | null                                            | true
 812 | 2017-09-20 03:16:55.805577 | 0000-0001-7917-3892:update:current_affiliation | null                                            | "Department of Astronomy, University of Geneva"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions