diff options
Diffstat (limited to 'mdkapplet-enterprise-update-helper')
-rwxr-xr-x | mdkapplet-enterprise-update-helper | 7 |
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; |