Added flag check to hide pages #378
This commit is contained in:
parent
376cb76036
commit
3546d38f75
@ -35,7 +35,7 @@ type Server implements TableWithHistoryQuery {
|
|||||||
shortRoleNames(filter: ShortRoleNameFilter, page: Page, sort: Sort): [ShortRoleName]
|
shortRoleNames(filter: ShortRoleNameFilter, page: Page, sort: Sort): [ShortRoleName]
|
||||||
|
|
||||||
config: ServerConfig
|
config: ServerConfig
|
||||||
hasFeatureFlag(flag: String): Boolean
|
hasFeatureFlag(flag: String): FeatureFlag
|
||||||
|
|
||||||
createdAt: String
|
createdAt: String
|
||||||
modifiedAt: String
|
modifiedAt: String
|
||||||
|
@ -103,4 +103,7 @@ class ServerQuery(DataQueryWithHistoryABC):
|
|||||||
settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{server.discord_id}")
|
settings: ServerConfig = self._config.get_configuration(f"ServerConfig_{server.discord_id}")
|
||||||
if "flag" not in kwargs:
|
if "flag" not in kwargs:
|
||||||
return False
|
return False
|
||||||
return FeatureFlagsSettings.get_flag_from_dict(settings.feature_flags, FeatureFlagsEnum(kwargs["flag"]))
|
return {
|
||||||
|
"key": kwargs["flag"],
|
||||||
|
"value": FeatureFlagsSettings.get_flag_from_dict(settings.feature_flags, FeatureFlagsEnum(kwargs["flag"])),
|
||||||
|
}
|
||||||
|
@ -4,6 +4,7 @@ import {Level} from "./level.model";
|
|||||||
import {Client} from "./client.model";
|
import {Client} from "./client.model";
|
||||||
import { AutoRole } from "./auto_role.model";
|
import { AutoRole } from "./auto_role.model";
|
||||||
import { ServerConfig } from "../config/server-config.model";
|
import { ServerConfig } from "../config/server-config.model";
|
||||||
|
import { FeatureFlag } from "../config/feature-flags.model";
|
||||||
|
|
||||||
export interface GameServer {
|
export interface GameServer {
|
||||||
id?: number;
|
id?: number;
|
||||||
@ -24,7 +25,8 @@ export interface Server extends Data {
|
|||||||
userCount?: number;
|
userCount?: number;
|
||||||
users?: User[];
|
users?: User[];
|
||||||
config?: ServerConfig;
|
config?: ServerConfig;
|
||||||
hasFeatureFlag?: boolean;
|
hasFeatureFlag?: FeatureFlag;
|
||||||
|
activeFeatureFlags?: FeatureFlag[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ServerFilter {
|
export interface ServerFilter {
|
||||||
|
@ -85,7 +85,10 @@ export class Queries {
|
|||||||
static hasServerFeatureFlag = `
|
static hasServerFeatureFlag = `
|
||||||
query HasServerFeatureFlag($filter: ServerFilter, $flag: String) {
|
query HasServerFeatureFlag($filter: ServerFilter, $flag: String) {
|
||||||
servers(filter: $filter) {
|
servers(filter: $filter) {
|
||||||
hasFeatureFlag(flag: $flag)
|
hasFeatureFlag(flag: $flag) {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
@ -7,6 +7,7 @@ import { Achievement, AchievementAttribute } from "../data/achievement.model";
|
|||||||
import { TechnicianConfig } from "../config/technician-config.model";
|
import { TechnicianConfig } from "../config/technician-config.model";
|
||||||
import { ServerConfig } from "../config/server-config.model";
|
import { ServerConfig } from "../config/server-config.model";
|
||||||
import { ShortRoleName } from "../data/short_role_name.model";
|
import { ShortRoleName } from "../data/short_role_name.model";
|
||||||
|
import { FeatureFlag } from "../config/feature-flags.model";
|
||||||
|
|
||||||
export interface Query {
|
export interface Query {
|
||||||
serverCount: number;
|
serverCount: number;
|
||||||
@ -66,7 +67,7 @@ export interface PossibleFeatureFlagsQuery {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface HasServerFeatureFlagQuery {
|
export interface HasServerFeatureFlagQuery {
|
||||||
hasFeatureFlag: boolean;
|
hasFeatureFlag: FeatureFlag;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ShortRoleNameListQuery {
|
export interface ShortRoleNameListQuery {
|
||||||
|
@ -9,7 +9,7 @@ import { NavigationEnd, Router } from "@angular/router";
|
|||||||
export class ServerService {
|
export class ServerService {
|
||||||
|
|
||||||
|
|
||||||
server$ = new BehaviorSubject<Server | null>(null);
|
server$ = new BehaviorSubject<Server | undefined>(undefined);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private router: Router
|
private router: Router
|
||||||
@ -19,16 +19,17 @@ export class ServerService {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!event.url.startsWith("/server/") && this.server$.value) {
|
if (!event.url.startsWith("/server/") && this.server$.value) {
|
||||||
this.setServer(null);
|
this.setServer(undefined);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setServer(server: Server | null) {
|
setServer(server: Server | undefined) {
|
||||||
if (!server) {
|
if (!server) {
|
||||||
this.server$.next(server);
|
this.server$.next(undefined);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (server.id != this.server$.value?.id) {
|
if (server.id != this.server$.value?.id) {
|
||||||
this.server$.next(server);
|
this.server$.next(server);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable } from "@angular/core";
|
import { Injectable } from "@angular/core";
|
||||||
import { MenuItem } from "primeng/api";
|
import { MenuItem } from "primeng/api";
|
||||||
import { BehaviorSubject } from "rxjs";
|
import { BehaviorSubject, forkJoin, Observable } from "rxjs";
|
||||||
import { AuthRoles } from "../../models/auth/auth-roles.enum";
|
import { AuthRoles } from "../../models/auth/auth-roles.enum";
|
||||||
import { AuthService } from "../auth/auth.service";
|
import { AuthService } from "../auth/auth.service";
|
||||||
import { TranslateService } from "@ngx-translate/core";
|
import { TranslateService } from "@ngx-translate/core";
|
||||||
@ -9,170 +9,222 @@ import { ThemeService } from "../theme/theme.service";
|
|||||||
import { Server } from "../../models/data/server.model";
|
import { Server } from "../../models/data/server.model";
|
||||||
import { UserDTO } from "../../models/auth/auth-user.dto";
|
import { UserDTO } from "../../models/auth/auth-user.dto";
|
||||||
import { ServerService } from "../server.service";
|
import { ServerService } from "../server.service";
|
||||||
|
import { HasServerFeatureFlagQuery, PossibleFeatureFlagsQuery, Query } from "../../models/graphql/query.model";
|
||||||
|
import { Queries } from "../../models/graphql/queries.model";
|
||||||
|
import { DataService } from "../data/data.service";
|
||||||
|
import { FeatureFlag } from "../../models/config/feature-flags.model";
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: "root"
|
providedIn: "root"
|
||||||
})
|
})
|
||||||
export class SidebarService {
|
export class SidebarService {
|
||||||
|
|
||||||
isSidebarOpen: boolean = true;
|
isSidebarOpen: boolean = true;
|
||||||
menuItems$ = new BehaviorSubject<MenuItem[]>(new Array<MenuItem>());
|
menuItems$ = new BehaviorSubject<MenuItem[]>(new Array<MenuItem>());
|
||||||
server!: Server | null;
|
server!: Server | undefined;
|
||||||
|
|
||||||
dashboard: MenuItem = {};
|
dashboard: MenuItem = {};
|
||||||
serverDashboard: MenuItem = {};
|
serverDashboard: MenuItem = {};
|
||||||
serverProfile: MenuItem = {};
|
serverProfile: MenuItem = {};
|
||||||
serverMembers: MenuItem = {};
|
serverMembers: MenuItem = {};
|
||||||
serverAutoRoles: MenuItem = {};
|
serverAutoRoles: MenuItem = {};
|
||||||
serverLevels: MenuItem = {};
|
serverLevels: MenuItem = {};
|
||||||
serverAchievements: MenuItem = {};
|
serverAchievements: MenuItem = {};
|
||||||
serverShortRoleNames: MenuItem = {};
|
serverShortRoleNames: MenuItem = {};
|
||||||
serverConfig: MenuItem = {};
|
serverConfig: MenuItem = {};
|
||||||
serverMenu: MenuItem = {};
|
serverMenu: MenuItem = {};
|
||||||
adminConfig: MenuItem = {};
|
adminConfig: MenuItem = {};
|
||||||
adminUsers: MenuItem = {};
|
adminUsers: MenuItem = {};
|
||||||
adminMenu: MenuItem = {};
|
adminMenu: MenuItem = {};
|
||||||
|
|
||||||
constructor(
|
featureFlags: FeatureFlag[] = [];
|
||||||
private themeService: ThemeService,
|
|
||||||
private authService: AuthService,
|
|
||||||
private translateService: TranslateService,
|
|
||||||
private router: Router,
|
|
||||||
private serverService: ServerService
|
|
||||||
) {
|
|
||||||
this.themeService.isSidebarOpen$.subscribe(value => {
|
|
||||||
this.isSidebarOpen = value;
|
|
||||||
this.setMenu(true);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.translateService.onLangChange.subscribe(_ => {
|
constructor(
|
||||||
this.setMenu(true);
|
private themeService: ThemeService,
|
||||||
});
|
private authService: AuthService,
|
||||||
|
private translateService: TranslateService,
|
||||||
|
private router: Router,
|
||||||
|
private serverService: ServerService,
|
||||||
|
private data: DataService
|
||||||
|
) {
|
||||||
|
this.themeService.isSidebarOpen$.subscribe(value => {
|
||||||
|
this.isSidebarOpen = value;
|
||||||
|
this.setMenu(true);
|
||||||
|
});
|
||||||
|
|
||||||
this.serverService.server$.subscribe(server => {
|
this.translateService.onLangChange.subscribe(_ => {
|
||||||
this.server = server;
|
this.setMenu(true);
|
||||||
if (server) {
|
});
|
||||||
this.setMenu(true);
|
|
||||||
} else {
|
|
||||||
this.setMenu(false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async buildMenu(user: UserDTO | null, hasPermission: boolean, isTechnician: boolean = false) {
|
this.serverService.server$.subscribe(server => {
|
||||||
this.dashboard = {
|
this.server = server;
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.dashboard") : "",
|
if (server) {
|
||||||
icon: "pi pi-th-large",
|
this.setMenu(true);
|
||||||
routerLink: "dashboard"
|
} else {
|
||||||
};
|
this.setMenu(false);
|
||||||
this.serverDashboard = {
|
}
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.dashboard") : "",
|
});
|
||||||
icon: "pi pi-th-large",
|
}
|
||||||
routerLink: `server/${this.server?.id}`
|
|
||||||
};
|
|
||||||
this.serverProfile = {
|
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.profile") : "",
|
|
||||||
icon: "pi pi-id-card",
|
|
||||||
routerLink: `server/${this.server?.id}/members/${user?.id}`
|
|
||||||
};
|
|
||||||
this.serverMembers = {
|
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.members") : "",
|
|
||||||
icon: "pi pi-users",
|
|
||||||
visible: true,
|
|
||||||
routerLink: `server/${this.server?.id}/members`
|
|
||||||
};
|
|
||||||
|
|
||||||
this.serverAutoRoles = {
|
async buildMenu(user: UserDTO | null, hasPermission: boolean, isTechnician: boolean = false) {
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.auto_roles") : "",
|
this.dashboard = {
|
||||||
icon: "pi pi-sitemap",
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.dashboard") : "",
|
||||||
visible: true,
|
icon: "pi pi-th-large",
|
||||||
routerLink: `server/${this.server?.id}/auto-roles`
|
routerLink: "dashboard"
|
||||||
};
|
};
|
||||||
|
this.serverDashboard = {
|
||||||
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.dashboard") : "",
|
||||||
|
icon: "pi pi-th-large",
|
||||||
|
routerLink: `server/${this.server?.id}`
|
||||||
|
};
|
||||||
|
this.serverProfile = {
|
||||||
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.profile") : "",
|
||||||
|
icon: "pi pi-id-card",
|
||||||
|
routerLink: `server/${this.server?.id}/members/${user?.id}`
|
||||||
|
};
|
||||||
|
this.serverMembers = {
|
||||||
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.members") : "",
|
||||||
|
icon: "pi pi-users",
|
||||||
|
visible: true,
|
||||||
|
routerLink: `server/${this.server?.id}/members`
|
||||||
|
};
|
||||||
|
|
||||||
this.serverLevels = {
|
this.serverAutoRoles = {
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.levels") : "",
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.auto_roles") : "",
|
||||||
icon: "pi pi-book",
|
icon: "pi pi-sitemap",
|
||||||
visible: true,
|
visible: true,
|
||||||
routerLink: `server/${this.server?.id}/levels`
|
routerLink: `server/${this.server?.id}/auto-roles`
|
||||||
};
|
};
|
||||||
|
|
||||||
this.serverAchievements = {
|
this.serverLevels = {
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.achievements") : "",
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.levels") : "",
|
||||||
icon: "pi pi-angle-double-up",
|
icon: "pi pi-book",
|
||||||
visible: true,
|
visible: true,
|
||||||
routerLink: `server/${this.server?.id}/achievements`
|
routerLink: `server/${this.server?.id}/levels`
|
||||||
};
|
};
|
||||||
|
|
||||||
this.serverShortRoleNames = {
|
this.serverAchievements = {
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.short_role_names") : "",
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.achievements") : "",
|
||||||
icon: "pi pi-list",
|
icon: "pi pi-angle-double-up",
|
||||||
visible: true,
|
visible: true,
|
||||||
routerLink: `server/${this.server?.id}/short-role-names`
|
routerLink: `server/${this.server?.id}/achievements`
|
||||||
};
|
};
|
||||||
|
|
||||||
this.serverConfig = {
|
this.serverShortRoleNames = {
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.configuration") : "",
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.short_role_names") : "",
|
||||||
icon: "pi pi-cog",
|
icon: "pi pi-list",
|
||||||
visible: true,
|
visible: true,
|
||||||
routerLink: `server/${this.server?.id}/config`
|
routerLink: `server/${this.server?.id}/short-role-names`
|
||||||
};
|
};
|
||||||
|
|
||||||
this.serverMenu = {
|
this.serverConfig = {
|
||||||
label: this.isSidebarOpen ? this.server?.name : "",
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.server.configuration") : "",
|
||||||
icon: "pi pi-server",
|
icon: "pi pi-cog",
|
||||||
visible: false,
|
visible: true,
|
||||||
expanded: true,
|
routerLink: `server/${this.server?.id}/config`
|
||||||
items: [this.serverDashboard, this.serverProfile, this.serverMembers, this.serverAutoRoles, this.serverLevels, this.serverAchievements, this.serverShortRoleNames, this.serverConfig]
|
};
|
||||||
};
|
|
||||||
this.adminConfig = {
|
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.config") : "",
|
|
||||||
visible: hasPermission || isTechnician,
|
|
||||||
icon: "pi pi-cog",
|
|
||||||
routerLink: "/admin/settings"
|
|
||||||
};
|
|
||||||
this.adminUsers = {
|
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.auth_user_list") : "",
|
|
||||||
visible: hasPermission,
|
|
||||||
icon: "pi pi-user-edit",
|
|
||||||
routerLink: "/admin/users"
|
|
||||||
};
|
|
||||||
this.adminMenu = {
|
|
||||||
label: this.isSidebarOpen ? this.translateService.instant("sidebar.administration") : "",
|
|
||||||
icon: "pi pi-cog",
|
|
||||||
visible: hasPermission || isTechnician,
|
|
||||||
expanded: true,
|
|
||||||
items: [this.adminConfig, this.adminUsers]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
setMenu(build: boolean = false) {
|
this.serverMenu = {
|
||||||
this.authService.hasUserPermission(AuthRoles.Admin).then(async hasPermission => {
|
label: this.isSidebarOpen ? this.server?.name : "",
|
||||||
let authUser = await this.authService.getLoggedInUser();
|
icon: "pi pi-server",
|
||||||
let user: UserDTO | null = authUser?.users?.find(u => u.server == this.server?.id) ?? null;
|
visible: false,
|
||||||
let isTechnician = authUser?.users?.map(u => u.isTechnician).filter(u => u) ?? [];
|
expanded: true,
|
||||||
|
items: [this.serverDashboard, this.serverProfile, this.serverMembers, this.serverAutoRoles, this.serverLevels, this.serverAchievements, this.serverShortRoleNames, this.serverConfig]
|
||||||
|
};
|
||||||
|
this.adminConfig = {
|
||||||
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.config") : "",
|
||||||
|
visible: hasPermission || isTechnician,
|
||||||
|
icon: "pi pi-cog",
|
||||||
|
routerLink: "/admin/settings"
|
||||||
|
};
|
||||||
|
this.adminUsers = {
|
||||||
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.auth_user_list") : "",
|
||||||
|
visible: hasPermission,
|
||||||
|
icon: "pi pi-user-edit",
|
||||||
|
routerLink: "/admin/users"
|
||||||
|
};
|
||||||
|
this.adminMenu = {
|
||||||
|
label: this.isSidebarOpen ? this.translateService.instant("sidebar.administration") : "",
|
||||||
|
icon: "pi pi-cog",
|
||||||
|
visible: hasPermission || isTechnician,
|
||||||
|
expanded: true,
|
||||||
|
items: [this.adminConfig, this.adminUsers]
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
if (build || this.menuItems$.value.length == 0) {
|
setMenu(build: boolean = false) {
|
||||||
await this.buildMenu(user, hasPermission, isTechnician.length > 0);
|
const server = this.server;
|
||||||
}
|
|
||||||
|
|
||||||
if (this.server) {
|
if (server) {
|
||||||
this.serverMenu.visible = true;
|
this.featureFlags = [];
|
||||||
this.serverMembers.visible = !!user?.isModerator;
|
this.data.query<PossibleFeatureFlagsQuery>("{possibleFeatureFlags}"
|
||||||
this.serverAutoRoles.visible = !!user?.isModerator;
|
).subscribe(data => {
|
||||||
this.serverLevels.visible = !!user?.isModerator;
|
let observables: Observable<HasServerFeatureFlagQuery>[] = [];
|
||||||
this.serverAchievements.visible = !!user?.isModerator;
|
data.possibleFeatureFlags.forEach(flag => {
|
||||||
this.serverShortRoleNames.visible = !!user?.isAdmin;
|
observables.push(
|
||||||
this.serverConfig.visible = !!user?.isAdmin || isTechnician.length > 0;
|
this.data.query<HasServerFeatureFlagQuery>(Queries.hasServerFeatureFlag, {
|
||||||
} else {
|
filter: { id: server.id },
|
||||||
this.serverMenu.visible = false;
|
flag: flag
|
||||||
}
|
},
|
||||||
|
function(data: Query) {
|
||||||
|
return data.servers[0];
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
let menuItems: MenuItem[] = [
|
forkJoin(observables).subscribe(data => {
|
||||||
this.dashboard,
|
data.forEach(flag => {
|
||||||
this.serverMenu,
|
if (!flag.hasFeatureFlag.value) {
|
||||||
this.adminMenu
|
return;
|
||||||
];
|
}
|
||||||
this.menuItems$.next(menuItems);
|
this.featureFlags.push(flag.hasFeatureFlag);
|
||||||
});
|
});
|
||||||
}
|
this._setMenu(build);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this._setMenu(build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private _setMenu(build: boolean = false) {
|
||||||
|
this.authService.hasUserPermission(AuthRoles.Admin).then(async hasPermission => {
|
||||||
|
let authUser = await this.authService.getLoggedInUser();
|
||||||
|
let user: UserDTO | null = authUser?.users?.find(u => u.server == this.server?.id) ?? null;
|
||||||
|
let isTechnician = authUser?.users?.map(u => u.isTechnician).filter(u => u) ?? [];
|
||||||
|
|
||||||
|
if (build || this.menuItems$.value.length == 0) {
|
||||||
|
await this.buildMenu(user, hasPermission, isTechnician.length > 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.server) {
|
||||||
|
this.serverMenu.visible = true;
|
||||||
|
this.serverMembers.visible = !!user?.isModerator;
|
||||||
|
this.serverAutoRoles.visible = this.hasFeature("AutoRoleModule") ? !!user?.isModerator : false;
|
||||||
|
this.serverLevels.visible = this.hasFeature("LevelModule") ? !!user?.isModerator : false;
|
||||||
|
this.serverAchievements.visible = this.hasFeature("AchievementsModule") ? !!user?.isModerator : false;
|
||||||
|
this.serverShortRoleNames.visible = this.hasFeature("ShortRoleNameModule") ? !!user?.isAdmin : false;
|
||||||
|
|
||||||
|
this.serverConfig.visible = !!user?.isAdmin || isTechnician.length > 0;
|
||||||
|
} else {
|
||||||
|
this.serverMenu.visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
let menuItems: MenuItem[] = [
|
||||||
|
this.dashboard,
|
||||||
|
this.serverMenu,
|
||||||
|
this.adminMenu
|
||||||
|
];
|
||||||
|
this.menuItems$.next(menuItems);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private hasFeature(key: string): boolean {
|
||||||
|
const flag = this.featureFlags.filter(flag => flag.key == key);
|
||||||
|
if (flag.length == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return flag[0].value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user