Ver código fonte

allowe masterkey to extcleint apis

Abhishek Kondur 2 anos atrás
pai
commit
72ba473df3
1 arquivos alterados com 3 adições e 0 exclusões
  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