summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-11-19 17:57:26 +0000
committerThierry Vignaud <tv@mandriva.org>2009-11-19 17:57:26 +0000
commitb82204b8886a43306d7ccbaada0d67f86bd6ff1b (patch)
tree09be0359085f5129b5b7038177370ea6351d2694
parent97c304631ac7dc3f4d2250eb0ffdbf9f4f146878 (diff)
downloadmgaonline-b82204b8886a43306d7ccbaada0d67f86bd6ff1b.tar
mgaonline-b82204b8886a43306d7ccbaada0d67f86bd6ff1b.tar.gz
mgaonline-b82204b8886a43306d7ccbaada0d67f86bd6ff1b.tar.bz2
mgaonline-b82204b8886a43306d7ccbaada0d67f86bd6ff1b.tar.xz
mgaonline-b82204b8886a43306d7ccbaada0d67f86bd6ff1b.zip
(has_mes5_rights) new authentication scheme (#55735)
-rw-r--r--NEWS3
-rwxr-xr-xmdkapplet-enterprise-update-helper7
2 files changed, 9 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 5104e0b6..fbac9fc0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- mdkapplet-enterprise-update-helper
+ o new authentication scheme (#55735)
+
Version 2.77.10 - 19 November 2009, Thierry Vignaud
- mdkapplet
diff --git a/mdkapplet-enterprise-update-helper b/mdkapplet-enterprise-update-helper
index c18747c4..a4e1be63 100755
--- a/mdkapplet-enterprise-update-helper
+++ b/mdkapplet-enterprise-update-helper
@@ -112,6 +112,11 @@ sub get_from {
$response;
}
+sub has_mes5_rights {
+ my ($ref) = @_;
+ $ref->{data}{groups}{'es5-prod'} || $ref->{data}{groups}{'es5-demo'};
+}
+
my $error;
sub add_enterprise_update_medium {
my ($email, $password) = @_;
@@ -125,7 +130,7 @@ sub add_enterprise_update_medium {
my $in = interactive->vnew;
$in->ask_warn(N("Error"), N("An error occurred") . "\n" . $ref->{message});
goto &get_restricted_authentication;
- } elsif ($ref->{data}{'can-access-restricted-repositories'} ne 'YES') {
+ } elsif (!has_mes5_rights($ref)) {
no_rigths_dialog();
} else {
$error = 0;