Only set admin key if not already done

master
Daniel Berteaud 10 years ago
parent de2bd1e9b8
commit 9002158e85
  1. 2
      vroom.pl

@ -2208,7 +2208,9 @@ group {
# TODO: support several auth method, including an internal one where user are managed # TODO: support several auth method, including an internal one where user are managed
# in our DB, and another where auth is handled by the web server # in our DB, and another where auth is handled by the web server
$self->login; $self->login;
if ($self->get_key_role($self->session('key'), undef) ne 'admin'){
$self->make_key_admin($self->session('key')); $self->make_key_admin($self->session('key'));
}
$self->purge_rooms; $self->purge_rooms;
$self->stash(admin => 1); $self->stash(admin => 1);
return 1; return 1;

Loading…
Cancel
Save