Skip to content

Commit

Permalink
Review exception message (CTERA-137).
Browse files Browse the repository at this point in the history
  • Loading branch information
chenkins committed Jan 11, 2024
1 parent 4e7b873 commit c0b7ad3
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import ch.cyberduck.core.DefaultIOExceptionMappingService;
import ch.cyberduck.core.DisabledListProgressListener;
import ch.cyberduck.core.Local;
import ch.cyberduck.core.LocaleFactory;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathAttributes;
import ch.cyberduck.core.Permission;
Expand All @@ -19,7 +18,6 @@

import javax.xml.namespace.QName;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -173,8 +171,9 @@ protected static void checkCteraRole(final Path file, final Acl.Role role) throw
return;
}
if(!acl.get(new Acl.CanonicalUser()).contains(role)) {
throw new AccessDeniedException(MessageFormat.format(LocaleFactory.localizedString("Download {0} failed", "Error"),
file.getName())).withFile(file);
throw new AccessDeniedException(
String.format("Access to %s failed, requires %s, found %s", file.getAbsolute(), role, acl)
).withFile(file);
}
}
}

0 comments on commit c0b7ad3

Please sign in to comment.