summaryrefslogtreecommitdiffstats
path: root/mdkapplet-enterprise-update-helper
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 /mdkapplet-enterprise-update-helper
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)
Diffstat (limited to 'mdkapplet-enterprise-update-helper')
-rwxr-xr-xmdkapplet-enterprise-update-helper7
1 files changed, 6 insertions, 1 deletions
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;