Procházet zdrojové kódy

allowe masterkey to extcleint apis

Abhishek Kondur před 2 roky
rodič
revize
72ba473df3
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  1. 3 0
      logic/gateway.go

+ 3 - 0
logic/gateway.go

@@ -232,6 +232,9 @@ func DeleteGatewayExtClients(gatewayID string, networkName string) error {
 
 // IsUserAllowedAccessToExtClient - checks if user has permission to access extclient
 func IsUserAllowedAccessToExtClient(username string, client models.ExtClient) bool {
+	if username == Master_uname {
+		return true
+	}
 	user, err := GetUser(username)
 	if err != nil {
 		return false