From 126329a2bc78e426d10081d334c3e05d4ef041f0 Mon Sep 17 00:00:00 2001
From: Guillaume Rousse <guillaume.rousse@renater.fr>
Date: Fri, 2 Mar 2018 13:31:40 +0100
Subject: [PATCH] hardcode version in code, not configuration

---
 conf/manager.conf.in      | 1 -
 lib/AccountManager/App.pm | 4 +++-
 t/manager.conf            | 2 --
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/conf/manager.conf.in b/conf/manager.conf.in
index ac2dd91..f611a61 100644
--- a/conf/manager.conf.in
+++ b/conf/manager.conf.in
@@ -4,7 +4,6 @@ tokens_validity_period = 2
 
 
 [app]
-version = open Beta 1
 url = https://my.fqdn/accountmanager
 support_email = support@my.fqdn
 
diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm
index 17a27d2..950aed7 100644
--- a/lib/AccountManager/App.pm
+++ b/lib/AccountManager/App.pm
@@ -39,6 +39,8 @@ my %actions = (
     download_accounts  => 'req_download_accounts',
 );
 
+my $version = '1.0';
+
 sub new {
     my ($pkg, %args) = @_;
 
@@ -128,7 +130,7 @@ sub respond {
     $in{data}->{app} = {
         url           => $self->{configuration}->{app}->{url},
         support_email => $self->{configuration}->{app}->{support_email},
-        version       => $self->{configuration}->{app}->{version},
+        version       => $version,
     };
 
     my $lang = HTTP::AcceptLanguage->new($ENV{HTTP_ACCEPT_LANGUAGE})->match(qw/en fr/) || 'en';
diff --git a/t/manager.conf b/t/manager.conf
index d38a129..c1a031e 100755
--- a/t/manager.conf
+++ b/t/manager.conf
@@ -3,8 +3,6 @@ templates_dir = templates
 federation_metadata_file = t/edugain.xml
 
 [app]
-version = open Beta 1
-name = eduGAIN Access Check
 url = https://my.fqdn/accountmanager
 support_email = support@my.fqdn
 
-- 
GitLab