Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework/33 #20

Merged
merged 11 commits into from
Mar 4, 2022
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class CustomPageAccessGuard implements CanActivate {
let vanityUrl = next.paramMap.get("vanity-url");
let viewableRoleIDs = Array<number>();
if (vanityUrl) {
viewableRoleIDs = await this.getCustomPageRolesByVanityUrl(vanityUrl);
viewableRoleIDs = await this.getCustomPageRoleIDsByVanityUrl(vanityUrl);
if (!this.authenticationService.isCurrentUserNullOrUndefined()) {
if (this.authenticationService.doesCurrentUserHaveOneOfTheseRoles(viewableRoleIDs)) {
return true;
Expand All @@ -46,7 +46,7 @@ export class CustomPageAccessGuard implements CanActivate {
return false;
}

async getCustomPageRolesByVanityUrl(vanityUrl: string): Promise<Array<number>> {
async getCustomPageRoleIDsByVanityUrl(vanityUrl: string): Promise<Array<number>> {

return new Promise((resolve, reject) => {

Expand Down