WatWowMap / ReactMap

Pokemon GO Map frontend built with React
MIT License
129 stars 64 forks source link

Telegram permissions #390

Closed klablabla closed 2 years ago

klablabla commented 2 years ago

The permissions are not loaded for telegram. I got telegram authentication working with the following local.json file. But everyone that login has all the rights. It's not looking up the groups if the user is a member.

{ "interface": "0.0.0.0", "port": 8080, "packageSource": "git/docker", "api": { "sessionSecret": "98ki^e72~!@#(85o3kXLI*#c9wu5l!Zx", "reactMapSecret": "You Should Change Me", "maxSessions": 5, "queryAvailable": { "pokemon": true, "quests": true, "raids": true, "nests": false }, "pvp": { "leagues": [ { "name": "great", "cp": 1500 }, { "name": "ultra", "cp": 2500 } ], "levels": [ 50, 51 ], "reactMapHandlesPvp": false } }, "map": { "general": { "title": "ReactMap", "headerTitle": "ReactMap", "startLat": 0, "startLon": 0, "startZoom": 12, "minZoom": 10, "maxZoom": 18 }, "links": { "feedbackLink": "", "statsLink": "" }, "misc": { "enableQuestSetSelector": true } }, "clientSideOptions": { "pokemon": { "clustering": true, "glow": [ { "name": "Hundo", "perm": "iv", "num": 100, "value": "#ff1744", "op": "=" }, { "name": "Top 3 Ranks", "perm": "pvp", "num": 3, "value": "#0000ff", "op": "<=" }, { "name": "Multiple", "perm": "pvp", "value": "#800080" } ] } }, "database": { "settings": { "userTableName": "users", "sessionTableName": "session" }, "schemas": [ { "type": "mad", "host": "127.0.0.1", "port": 3306, "username": "Username", "password": "Password!", "database": "maddb", "charset": "utf8mb4", "hasAltQuests": false, "useFor": [ "device", "gym", "pokemon", "pokestop", "scanCell", "spawnpoint", "weather" ] }, { "type": "manual", "host": "127.0.0.1", "port": 3306, "username": "Username", "password": "Password", "database": "reactdb", "charset": "utf8mb4", "useFor": [ "session", "user", "nest", "portal" ] } ] }, "authentication": { "strategies": [ { "enabled": true, "name": "telegram", "type": "telegram", "botToken": "1234567890:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "groups": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ], "redirectUri": "https://url.com/auth/telegram/callback", "telegramBotEnvRef": "PoGoReactMapAuthbot" } ], "areaRestrictions": [ { "roles": [], "areas": [] }, { "roles": [], "areas": [] } ], "alwaysEnabledPerms": [], "perms": { "map": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "pokemon": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "iv": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "pvp": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "gyms": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "raids": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "pokestops": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "quests": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "lures": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "portals": { "enabled": true, "roles": [] }, "submissionCells": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "invasions": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "nests": { "enabled": true, "roles": [] }, "scanAreas": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "weather": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "spawnpoints": { "enabled": true, "roles": [] }, "scanCells": { "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] }, "devices": { "enabled": true, "roles": [] }, "donor": { "roles": [] }, "gymBadges": { "enabled": true, "roles": [ "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890", "-1001234567890" ] } } }, "tileServers": [ { "name": "auto" }, { "name": "Carto", "attribution": "Map tiles by Carto, under CC BY 3.0. Data by <a href='https://www.openstreetmap.org/'>OpenStreetMap</a>, under ODbL.", "url": "https://{s}.basemaps.cartocdn.com/rastertiles/voyager_labels_under/{z}/{x}/{y}{r}.png", "style": "light" }, { "name": "OSM", "attribution": "Map data © <a href='https://www.openstreetmap.org'>OpenStreetMap</a> contributors", "url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png", "style": "light" }, { "name": "Dark Matter", "attribution": "© <a href='https://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors © <a href='https://carto.com/attributions'>CARTO</a>", "url": "https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png", "style": "dark" }, { "name": "Satellite", "attribution": "&copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community", "url": "https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", "style": "dark" } ], "icons": { "Read_More_Here": "https://github.com/WatWowMap/ReactMap/wiki/Icons-Configuration", "customizable": [ "pokemon", "pokestop", "gym", "invasion", "reward" ], "styles": [ { "name": "Default", "path": "https://raw.githubusercontent.com/WatWowMap/wwm-uicons/main/", "modifiers": { "gym": { "0": 1, "1": 1, "2": 1, "3": 3, "4": 4, "5": 4, "6": 18, "sizeMultiplier": 1.2 } } }, { "name": "PMSF", "path": "https://raw.githubusercontent.com/whitewillem/PogoAssets/main/uicons-outline/", "modifiers": { "reward": { "offsetX": 0.2, "offsetY": 0.5, "sizeMultiplier": 1.15 }, "invasion": { "offsetX": 0.05, "offsetY": 0.7, "sizeMultiplier": 1.5, "removeQuest": true }, "pokestop": { "sizeMultiplier": 2, "manualPopup": -100 } } }, { "name": "Home", "path": "https://raw.githubusercontent.com/nileplumb/PkmnHomeIcons/master/UICONS/" }, { "name": "Shuffle", "path": "https://raw.githubusercontent.com/nileplumb/PkmnShuffleMap/master/UICONS/" }, { "name": "Half Shiny", "path": "https://raw.githubusercontent.com/jms412/PkmnShuffleMap/master/UICONS_Half_Shiny_Sparkles_256/" } ] }, "manualAreas": [ { "name": "City1", "lat": 41.920417, "lon": 43.340697, "zoom": 14 }, { "name": "City2", "lat": 3.105872, "lon": 4.098280, "zoom": 14 } ] }

klablabla commented 2 years ago

https://github.com/WatWowMap/ReactMap/pull/391 This is fixed now.