Do not create empty permissions

This commit is contained in:
René Pfeuffer
2019-01-23 11:20:27 +01:00
parent 6bf216d379
commit 48e1e16fe6

View File

@@ -206,7 +206,7 @@ public class DefaultAuthorizationCollector implements AuthorizationCollector
for (RepositoryPermission permission : repositoryPermissions) for (RepositoryPermission permission : repositoryPermissions)
{ {
hasPermission = isUserPermitted(user, groups, permission); hasPermission = isUserPermitted(user, groups, permission);
if (hasPermission) if (hasPermission && !permission.getVerbs().isEmpty())
{ {
String perm = "repository:" + String.join(",", permission.getVerbs()) + ":" + repository.getId(); String perm = "repository:" + String.join(",", permission.getVerbs()) + ":" + repository.getId();
if (logger.isTraceEnabled()) if (logger.isTraceEnabled())