[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] disable login for users



CAUTION: This e-mail originated outside the University of Southampton.
Also keep in mind that you might have users already authenticated, with unexpired authentication cookies/sessions.  I do remember that there is also a way of clearing all of the existing logged-in "tickets" from the database, to ensure that everyone will be required to go through that login script, but I don't remember which table it is that you would have to clear.

Tomasz


________________________________
From: eprints-tech-bounces at ecs.soton.ac.uk <eprints-tech-bounces at ecs.soton.ac.uk> on behalf of Yuri via Eprints-tech <eprints-tech at ecs.soton.ac.uk>
Sent: Monday, January 31, 2022 9:45 AM
To: eprints-tech at ecs.soton.ac.uk <eprints-tech at ecs.soton.ac.uk>
Subject: Re: [EP-tech] disable login for users

Attention This email originates from outside the concordia.ca domain. // Ce courriel provient de l'exterieur du domaine de concordia.ca
CAUTION: This e-mail originated outside the University of Southampton.

Hi!

  sorry for the noise, I've solved with

$c->{check_user_password} = sub {
    my( $session, $username, $password ) = @_;

    my $user = EPrints::DataObj::User::user_with_username( $session,
$username );
    return 0 unless $user;

    my $user_type = $user->get_type;
    if( $user_type eq "admin" || $user_type eq "editor" )
    {
       # internal authentication for "admin" type
       return $session->get_database->valid_login( $username, $password );
    }

    return 0;
}

in <archive>/cfg/cfg.d/user_login.pl

Il 31/01/22 15:34, Yuri via Eprints-tech ha scritto:
> CAUTION: This e-mail originated outside the University of Southampton.
>
> Hi!
>
>    I'm migrating an Eprints repository and I would like no user (but
> editor and admin yes) could login or do anything. I've disabled creating
> logins but also I would like to stop existing users.
>
>    What is the simplest way? Remove permissions to the user role?
>
>
> *** Options: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.ecs.soton.ac.uk%2Fmailman%2Flistinfo%2Feprints-tech&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf63772e730cf41152d4c08d9e5ca5b93%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637793480121799609%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=HGbCHx8kpCtPe4CwkxAAZlrrxYjQu7A6voxOjSNMHxk%3D&amp;reserved=0
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf63772e730cf41152d4c08d9e5ca5b93%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637793480121799609%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Ma9a2iC2uHiFWIiDVTWJnMJrPsguUHntJqvGnWNdNnQ%3D&amp;reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf63772e730cf41152d4c08d9e5ca5b93%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637793480121799609%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=0b0JZeYiPr5LZYdbBziFGcmlcSO20f058PqE3mJg3S0%3D&amp;reserved=0

*** Options: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmailman.ecs.soton.ac.uk%2Fmailman%2Flistinfo%2Feprints-tech&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf63772e730cf41152d4c08d9e5ca5b93%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637793480121799609%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=HGbCHx8kpCtPe4CwkxAAZlrrxYjQu7A6voxOjSNMHxk%3D&amp;reserved=0
*** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf63772e730cf41152d4c08d9e5ca5b93%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637793480121799609%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Ma9a2iC2uHiFWIiDVTWJnMJrPsguUHntJqvGnWNdNnQ%3D&amp;reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cf63772e730cf41152d4c08d9e5ca5b93%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637793480121799609%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=0b0JZeYiPr5LZYdbBziFGcmlcSO20f058PqE3mJg3S0%3D&amp;reserved=0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20220201/3796279b/attachment-0001.html