mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-21 01:21:54 +08:00
Fix VisibilityRequiredVoter version branch
This commit is contained in:
parent
c8d381e2cf
commit
35b2163e2e
@ -41,19 +41,19 @@ public class VisibilityRequiredVoter extends HangarDecisionVoter<VisibilityRequi
|
||||
} else if (this.projectService.getProjectTable((long) arguments[0]) != null) {
|
||||
return ACCESS_GRANTED;
|
||||
}
|
||||
} else {
|
||||
return ACCESS_DENIED;
|
||||
}
|
||||
return ACCESS_DENIED;
|
||||
case VERSION:
|
||||
if (arguments.length == 1 && this.versionService.getProjectVersionTable((long) arguments[0]) != null) {
|
||||
return ACCESS_GRANTED;
|
||||
if (arguments.length == 1) {
|
||||
if (this.versionService.getProjectVersionTable((long) arguments[0]) != null) {
|
||||
return ACCESS_GRANTED;
|
||||
}
|
||||
} else if (arguments.length == 3) {
|
||||
if (this.versionService.getProjectVersionTable((String) arguments[0], (String) arguments[1]) != null) { // TODO is platform needed here?
|
||||
return ACCESS_GRANTED;
|
||||
} else {
|
||||
return ACCESS_DENIED;
|
||||
}
|
||||
}
|
||||
return ACCESS_DENIED;
|
||||
}
|
||||
return ACCESS_ABSTAIN;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user