datadryad / dryad-product-roadmap

Repository of issues for Dryad project boards
https://github.com/orgs/datadryad/projects
8 stars 0 forks source link

test_login page doesn't set roles correctly #3434

Open ryscher opened 1 week ago

ryscher commented 1 week ago

We occasionally enable the test_login page, using the TEST_LOGIN environment variable. Since the user roles changed, this page doesn't insert the correct role information for its users.

Do we really still need this page? Its primary use is to skip ORCID login when the ORCID callback hasn't been configured for a server.

ryscher commented 1 week ago

Quick workaround, e.g., for user 2: insert into stash_engine_roles (user_id,role,created_at,updated_at) values (2,'superuser','2024-01-01','2024-01-01');

ahamelers commented 1 week ago

The rails way would be StashEngine::Role.create(user: user, role: 'superuser', role_object: nil)