Skip to content

Commit

Permalink
Minor bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
veniware committed Mar 8, 2024
1 parent a47c3ce commit 98e7860
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Protest/Front/personalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ class Personalize extends Tabs {
this.chatTab = this.AddTab("Chat", "mono/chat.svg");
this.agentTab = this.AddTab("Agent", "mono/agent.svg");

this.guiTab.onclick = ()=> this.ShowGui();
this.regionTab.onclickTab = ()=> this.ShowRegion();
this.sessionTab.onclick = ()=> this.ShowSession();
this.chatTab.onclick = ()=> this.ShowChat();
this.agentTab.onclick = ()=> this.ShowAgent();
this.guiTab.onclick = ()=> this.ShowGui();
this.regionTab.onclick = ()=> this.ShowRegion();
this.sessionTab.onclick = ()=> this.ShowSession();
this.chatTab.onclick = ()=> this.ShowChat();
this.agentTab.onclick = ()=> this.ShowAgent();

switch (this.params) {
case "region":
thr.classNameTab = "v-tab-selected";
this.regionTab.className = "v-tab-selected";
this.ShowRegion();
break;

Expand Down
2 changes: 1 addition & 1 deletion Protest/Http/Auth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private static HashSet<string> PopulateAccessPath(string[] accessList) {
path.Add("/lifeline/disk/view");
path.Add("/lifeline/diskusage/view");
path.Add("/ws/livestats/device");
path.Add("/ws/ws/monitor");
path.Add("/ws/monitor");
break;

case "manage users:write":
Expand Down
2 changes: 1 addition & 1 deletion Protest/Tools/Monitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public static async void WebSocketHandler(HttpListenerContext ctx) {
while (ws.State == WebSocketState.Open) {
WebSocketReceiveResult receiveResult = await ws.ReceiveAsync(new ArraySegment<byte>(buff), CancellationToken.None);

if (!Auth.IsAuthenticatedAndAuthorized(ctx, "")) {
if (!Auth.IsAuthenticatedAndAuthorized(ctx, "/ws/monitor")) {
await ws.CloseOutputAsync(WebSocketCloseStatus.NormalClosure, null, CancellationToken.None);
return;
}
Expand Down

0 comments on commit 98e7860

Please sign in to comment.