EPrints Technical Mailing List Archive

Message: #08854


< 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


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: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** 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%7C2d6ee929dee04fc6c49a08d9e4c864cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637792371598071920%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=CyI%2FyGFyoy1At4XfEQ9StiykXqg4Qyy2Lii5jYl%2Bba8%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%7C2d6ee929dee04fc6c49a08d9e4c864cd%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637792371598071920%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=CPTQe%2BXDYlLfKxW%2BwMx%2BGT%2FTJ8k8TbwyggauFxbO%2F4A%3D&amp;reserved=0