Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Add support for guest users #50

Closed
derat opened this issue Jan 5, 2023 · 0 comments
Closed

Add support for guest users #50

derat opened this issue Jan 5, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@derat
Copy link
Owner

derat commented Jan 5, 2023

I'd like to add support for guest users. When a user has its guest field set to true in the config, it should have similar rights to a normal user, except it shouldn't be able to access the /rate_and_tag endpoint.

I think I'd also like to rate-limit how many songs guests can download, except I'm not sure how that should work. Maybe the handler for /song could just limit them to X songs per minute for some low value of X. I'm not sure how to persist the count so it can be shared among instances: using datastore seems like it may not be great in terms of requiring a read and write for each request, but maybe it wouldn't be a big deal. Memcache is an option, but the count might be evicted frequently on the free shared service. The easy-but-cheesy option would be to only track the count in-memory in each instance and accept that the limit won't be properly enforced when requests are sent to different instances.

@derat derat added the enhancement New feature or request label Jan 5, 2023
@derat derat self-assigned this Jan 5, 2023
@derat derat closed this as completed in d5a8523 Jan 5, 2023
derat added a commit that referenced this issue Jan 7, 2023
I think that this makes more sense than letting guests
optionally report plays. See #50.
derat added a commit that referenced this issue Jan 7, 2023
Add a field to the User config struct that can be used to
specify tags that clients should use to filter songs. Also
add a /user endpoint that clients can call to get user info.

The output returned by /tags is filtered using the user's
excluded tags, but the songs returned by /export and /songs
aren't currently affected since it seems easier to just let
the client do its own filtering.

See #50.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant