The Wayback Machine - http://web.archive.org/web/20251226143218/https://github.com/ente-io/ente/discussions/2261
Skip to content
Discussion options

You must be logged in to vote

So the gist seems to be that admin is present after reading the config

settings := viper.AllSettings()

But is lost when we try to get in with

admins := viper.GetIntSlice("internal.admins")

If you're up for debugging then you could try and find out where in the middle it is getting lost. Also might be a good idea to add a printf for admins := viper.GetIntSlice("internal.admins") at the same point where you're doing the test print from settings := viper.AllSettings().


All that's if you wish to debug. OTOH, if you just wish to unblock yourself, one easy way is to change:

if int64(admin) == userID { 

to

if YOUR_ID == userID { 

Another way is to directly modify the storage in the DB, someth…

Replies: 4 comments 14 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@mnvr
Comment options

mnvr Jun 23, 2024
Maintainer

@iSLuP4l477u
Comment options

@iSLuP4l477u
Comment options

Comment options

You must be logged in to vote
9 replies
@iSLuP4l477u
Comment options

@iSLuP4l477u
Comment options

@iSLuP4l477u
Comment options

@mnvr
Comment options

mnvr Jun 25, 2024
Maintainer

Answer selected by iSLuP4l477u
@mnvr
Comment options

mnvr Jun 25, 2024
Maintainer

@iSLuP4l477u
Comment options

Comment options

You must be logged in to vote
2 replies
@filipecatraia
Comment options

@filipecatraia
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants