summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-03 17:26:12 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-10-03 17:26:12 (GMT)
commit29350f384f80c0d5399edaf90e0c0d66bf3d4427 (patch)
tree8b55e7cb757247b4c9992b7d490188a8a69b629b /utils
parentef3f0898ee3ceb0ca36c9fc9f9174ce656a64e20 (diff)
update token now honors context config
Diffstat (limited to 'utils')
-rwxr-xr-xutils/update-rd-tokens8
1 files changed, 1 insertions, 7 deletions
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";