mirror of
https://github.com/HangarMC/Hangar.git
synced 2025-02-17 15:01:42 +08:00
Fix VisibilityRequiredVoter type check
This commit is contained in:
parent
2195a43a01
commit
a5635982a1
@ -34,8 +34,11 @@ public class VisibilityRequiredVoter extends HangarDecisionVoter<VisibilityRequi
|
||||
switch (attribute.type()) {
|
||||
case PROJECT:
|
||||
if (arguments.length == 1) {
|
||||
if (arguments[0] instanceof String slug && this.projectService.getProjectTable(slug) != null
|
||||
|| this.projectService.getProjectTable((long) arguments[0]) != null) {
|
||||
if (arguments[0] instanceof String slug) {
|
||||
if (this.projectService.getProjectTable(slug) != null) {
|
||||
return ACCESS_GRANTED;
|
||||
}
|
||||
} else if (this.projectService.getProjectTable((long) arguments[0]) != null) {
|
||||
return ACCESS_GRANTED;
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user