HalosGhost / pandabin

A self-hostable, simple and fast pastebin written in C
GNU General Public License v3.0
3 stars 0 forks source link

Users and Galleries #13

Open HalosGhost opened 7 years ago

HalosGhost commented 7 years ago

Ownership, at least at the beginning, will have no effect; but it will allow us to add features in the future (e.g., filtering by poster, etc.).

Galleries, on the other hand provide a nice way to group pastes.

Both will be strings that the user can pass in as POST parameters (uid and gid).

uid is a UUID that must have been issued by pandabin; if the user specifies no UUID, or the string passed was not a valid UUID issued by pandabin, a new one will be generated.

gid is an arbitrary string.


GET /read?uid=<UUID>&gid=<STR> will return a page with links to each paste in the gallery.

Note that galleries will be treated as namespaced per-user.

The gallery page will hopefully leverage lwan's mustache templates so that the provider can customize the gallery view to their liking.


At least, this will require two columns to be added to the pastes table (uid and gid). gid will be nullable, both will be text. It might make life simpler to have a users table, but we'll cross that bridge if/when we come to it.