EPrints Technical Mailing List Archive

Message: #08857


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] disable login for users


Its the loginticket table. I use the following MySQL command to empty this table:


TRUNCATE loginticket;


I have contemplated adding an epadmin sub-command that would allow you to effectively do the same thing.


On 01/02/2022 21:32, Tomasz Neugebauer via Eprints-tech wrote:
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@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of Yuri via Eprints-tech <eprints-tech@ecs.soton.ac.uk>
Sent: Monday, January 31, 2022 9:45 AM
To: eprints-tech@ecs.soton.ac.uk <eprints-tech@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://can01.safelinks.protection.outlook.com/?url="">
> *** Archive:
https://can01.safelinks.protection.outlook.com/?url="">
> *** EPrints community wiki:
https://can01.safelinks.protection.outlook.com/?url="">

*** Options:
https://can01.safelinks.protection.outlook.com/?url="">
*** Archive:
https://can01.safelinks.protection.outlook.com/?url="">
*** EPrints community wiki:
https://can01.safelinks.protection.outlook.com/?url="">


*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/

Virus-free. www.avg.com