This commit is contained in:
Colin McDonald 2016-05-10 18:45:25 -04:00
parent 46eda73347
commit b76eead314

View File

@ -9,7 +9,7 @@ import java.util.Set;
public final class UserActor implements Actor {
private static final Set<String> authorizedUserGrants = ImmutableSet.copyOf(APIv3.getConfig().getProperty("auth.permittedUserRanks").split(","));
private static final Set<String> permittedUserRanks = ImmutableSet.copyOf(APIv3.getConfig().getProperty("auth.permittedUserRanks").split(","));
@Getter private final User user;
// We use Boolean here so we can have null = not calculated;
@ -24,7 +24,7 @@ public final class UserActor implements Actor {
return cachedAuthorized;
} else {
String highestRankId = user.getHighestRank().getId();
cachedAuthorized = authorizedUserGrants.contains(highestRankId);
cachedAuthorized = permittedUserRanks.contains(highestRankId);
return cachedAuthorized;
}
}