- Timestamp:
- Sep 4, 2018, 1:00:48 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/Handlers/UserStatusHandler.cs
r309 r325 1 using System;2 using System.Collections.Generic;3 using System.IO;4 1 using System.Net; 5 using System.Threading;6 using System.Text;7 2 using AllocsFixes.JSON; 3 using AllocsFixes.NetConnections.Servers.Web.API; 8 4 9 namespace AllocsFixes.NetConnections.Servers.Web.Handlers 10 { 5 namespace AllocsFixes.NetConnections.Servers.Web.Handlers { 11 6 public class UserStatusHandler : PathHandler { 12 public UserStatusHandler (string moduleName = null) : base (moduleName) {7 public UserStatusHandler (string moduleName = null) : base (moduleName) { 13 8 } 14 9 15 public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, int permissionLevel) { 10 public override void HandleRequest (HttpListenerRequest req, HttpListenerResponse resp, WebConnection user, 11 int permissionLevel) { 16 12 JSONObject result = new JSONObject (); 17 13 … … 23 19 JSONObject permObj = new JSONObject (); 24 20 permObj.Add ("module", new JSONString (perm.module)); 25 permObj.Add ("allowed", new JSONBoolean (WebPermissions.Instance.ModuleAllowedWithLevel (perm.module, permissionLevel))); 21 permObj.Add ("allowed", 22 new JSONBoolean (WebPermissions.Instance.ModuleAllowedWithLevel (perm.module, permissionLevel))); 26 23 perms.Add (permObj); 27 24 } 25 28 26 result.Add ("permissions", perms); 29 27 30 AllocsFixes.NetConnections.Servers.Web.API.WebAPI.WriteJSON (resp, result);28 WebAPI.WriteJSON (resp, result); 31 29 } 32 33 30 } 34 35 31 } 36
Note:
See TracChangeset
for help on using the changeset viewer.