-
-
Notifications
You must be signed in to change notification settings - Fork 84
[WIP] - Admin view to view _all_ entries #122
base: master
Are you sure you want to change the base?
Conversation
Pull Request Test Coverage Report for Build 429
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the rest looks good to me
internal/stores/redis/redis.go
Outdated
users := r.c.Keys(userToEntriesPrefix + "*") | ||
for _, v := range users.Val() { | ||
logrus.Debugf("got userEntry: %s", v) | ||
// user, err := r.GetEntryByID(string(v)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove the comments
Hi @billimek, |
Hi @mxschmitt no updates since this 'MVP'. I'm personally ok with showing this PR as 'done' and working on (or asking someone else to work on) another one to bake-in some sort of authentication. Realistically I won't have time for a while to put more effort into this w/respect to further enhancing the admin view thing with more security. Thoughts? |
@billimek I really appreciate your effort in this pull request, so I don't want to leave it open. Do you think I can merge it? |
@mxschmitt I think help-wanted would be good idea, yeah! Alternatively, we can complete this one and have an open issue to add authorization to the admin view page. |
This PR is a work in progress.
What is the purpose of this PR? . This will enable an 'admin view' such that it is possible to view and delete any of the entries in the system, even if you did not create them.
/admin
) that will work very much like the/recent
page but will display all entries for all users.Some form of protection needs to be added to this - I'm thinking a 'admin password' that would need to be entered by the user would be compared with a configured password. If they match, then allow the user to load the page. I'm not sure how best to go about implementing this part (or open to other ideas as well)
An alternative approach could be to extend the
/recent
page with a button or some other control that would present the user with a password prompt, and if successful, would re-render the page with all the entries instead of just the entries associated with the user logged-in.Would love some feedback/suggestions, as not having the ability to see all entries is a limiting factor right now