From 29350f384f80c0d5399edaf90e0c0d66bf3d4427 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 3 Oct 2015 19:26:12 +0200 Subject: update token now honors context config diff --git a/utils/update-rd-tokens b/utils/update-rd-tokens index 4004e5d..0fda599 100755 --- a/utils/update-rd-tokens +++ b/utils/update-rd-tokens @@ -30,17 +30,11 @@ if ($> != 0 ) { exit 1; } -my $num_args = $#ARGV + 1; -if ($num_args <= 0) { - print STDERR "WARNING: this will update all user tokens (except for admin)\n"; -} - -my %EXCLUDED_USERS = map { $_ => 1 } @ARGV; -$EXCLUDED_USERS{'admin'} = 1; my $ret = 0; my ($ctx, undef, $errorstring) = RHRD::rddb::init(); if(defined $ctx) { + my %EXCLUDED_USERS = map { $_ => 1 } @{$ctx->{'config'}{'specialusers'}{'no-update-token'}}; my @users = RHRD::rddb::list_users($ctx); if(!defined $users[0] && defined $users[2]) { print STDERR "$users[2]\n"; -- cgit v0.10.2