Skip to content

Commit

Permalink
added freepass for admin forwhen no env is provided
Browse files Browse the repository at this point in the history
  • Loading branch information
elraphty committed Mar 27, 2024
1 parent 580aab8 commit 2f790e7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func AdminCheck(pubkey string) bool {
}

func IsFreePass() bool {
if len(config.SuperAdmins) == 1 && config.SuperAdmins[0] == config.AdminDevFreePass {
if len(config.SuperAdmins) == 1 && config.SuperAdmins[0] == config.AdminDevFreePass || config.AdminStrings == "" {
return true
}
return false
Expand Down
3 changes: 2 additions & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ var S3Url string
var AdminCheck string
var AdminDevFreePass = "FREE_PASS"
var Connection_Auth string
var AdminStrings string

var S3Client *s3.Client
var PresignClient *s3.PresignClient
Expand All @@ -44,7 +45,7 @@ func InitConfig() {
RelayUrl = os.Getenv("RELAY_URL")
MemeUrl = os.Getenv("MEME_URL")
RelayAuthKey = os.Getenv("RELAY_AUTH_KEY")
AdminStrings := os.Getenv("ADMINS")
AdminStrings = os.Getenv("ADMINS")
AwsSecret := os.Getenv("AWS_SECRET_ACCESS")
AwsAccess := os.Getenv("AWS_ACCESS_KEY_ID")
AwsRegion := os.Getenv("AWS_REGION")
Expand Down

0 comments on commit 2f790e7

Please sign in to comment.