API key generation deletes user

42 views
Skip to first unread message

Martin

unread,
Nov 25, 2020, 3:10:28 AM11/25/20
to AtoM Users
Hi everyone

What am I doing wrong here? Can you see this behavior as well?

Steps to reproduce:

1. vagrant up
2. login as *de...@example.com* and *demo*
3. Settings --> Plugins --> arRestApiPlugin:enable --> save
4. Users --> demo --> edit --> REST API access key: (Re)genrate API key --> save

This logs me out and I'm no longer able to login again. If I create another admin user (cli) I see that user *demo* does no longer exists!

Setup:

* AtoM version: 2.6.1
* Vagrant box: 2.6.0.2
* Vagrant version: 2.2.7
* OS: ubuntu 18.04

Vagrant file:

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
  config.vm.box = "artefactual/atom"
  config.vm.box_version = "2.6.0.2"

  config.vm.network "forwarded_port", guest: 80, host: 8000, host_ip: "127.0.0.1"

  config.vm.provision "shell", inline: <<-SHELL
    cd /home/vagrant/atom
    git pull
    git checkout v2.6.1
    php symfony tools:upgrade-sql --no-confirmation
    php symfony search:populate
    php symfony cc
    systemctl restart nginx.service
    systemctl restart php7.2-fpm.service
    systemctl restart elasticsearch.service
    systemctl restart atom-worker.service
    systemctl restart memcached.service
  SHELL
end

Dan Gillean

unread,
Nov 25, 2020, 9:35:14 AM11/25/20
to ICA-AtoM Users
Hi Martin, 

I suspect you may be running afoul of this bug we have discovered - where a user account is set to inactive when edited by the owner. See:
I haven't seen account deletions occur because of this, but it's possible that you just need to check the Inactive users tab in the User browser page to see the demo account. 

Our developers have identified the issue and created an initial fix - it still needs to be tested, after which it will be included in an upcoming 2.6.2 bug fix release. If you'd like to test out applying the changes locally in your development environment, you can see the related pull request with the changes here: 
Cheers, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him


--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/29372bdd-bb80-4d43-9e19-8ba2c0dbdab2n%40googlegroups.com.

Martin Kunz

unread,
Nov 26, 2020, 11:02:52 AM11/26/20
to ica-ato...@googlegroups.com
Hi Dan

Thank you very much for the quick response! Indeed, the demo user does not get deleted only deactivated. I'll keep track of the bug report you mentioned. Thanks a lot!

One thing is still strage:

I did try to use this commands to reactivate the demo user but none of them worked:

sudo php symfony tools:reset-password --activate de...@example.com demo
sudo php symfony tools:reset-password --activate demo demo 
sudo php symfony tools:reset-password --activate de...@example.com
sudo php symfony tools:reset-password --activate demo  

Is this behavior intended and I miss something?

Best Regards
Martin



--
Martin Kunz
Archivinformatiker

Docuteam GmbH
Informationsmanagement und Archivdienstleistungen
Im Langacker 16, CH-5405 Baden-Dättwil
T +41 56 511 11 48
www.docuteam.ch

Anwesenheit: Montag - Mittwoch

Digitale Archivierung in der Cloud: https://cosmos.docuteam.ch

Dan Gillean

unread,
Nov 26, 2020, 2:31:18 PM11/26/20
to ICA-AtoM Users
Hi Martin, 

A related bug report, for which there is a fix already in 2.6.2! (Though I'm not a developer I'm proud to report that I identified the cause and actually fixed the bug myself!) See: 
If you don't want to be applying these fixes as patches locally or making code changes, your best workaround for now will be to create a new admin account (there is a CLI task for that here), use that to log in and reactivate your existing admin account (and make any other changes to it that you need), and then you can delete the second admin account if desired, or keep it around in case this comes up again before 2.6.2 is available. 

Sorry for the hassle! Fixes soon!

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory
he / him

Martin Kunz

unread,
Nov 26, 2020, 2:38:57 PM11/26/20
to ica-ato...@googlegroups.com
Dear Dan

Oh I see! I definitely need to get better in finding open issues on https://projects.artefactual.com/issues/ to not always ask questions you already answered. Sorry for that and thanks a lot for your help!

Cheers,
Martin


Reply all
Reply to author
Forward
0 new messages