Bug 4104: Fixed minor null check

This commit is contained in:
Henri Kohlberg committed 2018-09-13 15:34:25 +02:00
1 parent 36deb057eb
commit 06e23c425e
1 file changed
+1 -1
@@ -128,7 +128,7 @@ public class TaggingServiceImpl implements TaggingService {
Subject subject = SecurityUtils.getSubject();
subject.checkPermission(
Permission.LEADERBOARD.getStringPermissionForObjects(Mode.UPDATE, leaderboardName));
if ((subject.getPrincipals() != null && subject.getPrincipal().equals(tag.getUsername()))
if ((subject.getPrincipal() != null && subject.getPrincipal().equals(tag.getUsername()))
|| subject.hasRole("admin")) {
raceLog.revokeEvent(tagEvent.getAuthor(), tagEvent, "Revoked");
} else {