Revision c6f8f128
b/gss/src/gr/ebs/gss/server/ejb/ExternalAPIBean.java | ||
---|---|---|
1508 | 1508 |
else |
1509 | 1509 |
throw new InsufficientPermissionsException("Only the owner can change the read-for-all flag"); |
1510 | 1510 |
|
1511 |
if (!permissions.isEmpty()) { |
|
1511 |
if (permissions != null && !permissions.isEmpty()) {
|
|
1512 | 1512 |
file.getPermissions().clear(); |
1513 | 1513 |
for (PermissionDTO dto : permissions) |
1514 | 1514 |
file.addPermission(getPermission(dto)); |
1515 | 1515 |
} |
1516 | 1516 |
|
1517 | 1517 |
// Update the file if there was a change. |
1518 |
if (readForAll != null || !permissions.isEmpty()) |
|
1518 |
if (readForAll != null || permissions != null && !permissions.isEmpty())
|
|
1519 | 1519 |
dao.update(file); |
1520 | 1520 |
|
1521 | 1521 |
} |
Also available in: Unified diff