photo / frontend

The official @github repository of the Trovebox frontend software. A photo sharing and photo management web interface for data stored "in the cloud" (i.e. Amazon S3, Rackspace CloudFiles, Google Storage).
https://trovebox.com
Apache License 2.0
1.37k stars 244 forks source link

Multi-user setup for self-hosted openphoto installation #706

Open cjlpa opened 12 years ago

cjlpa commented 12 years ago

Hello,

since this Issue https://github.com/openphoto/frontend/issues/630 has been closed, but the core Issue itself has not been addressed, I'd like to re-open it (for "Wishlist" maybe?)

Is there a way to have a multi-user setup with the self-hosted server?

hfiguiere commented 12 years ago

This is a follow up to issue #630.

Setting as wishlist.

jmathai commented 12 years ago

Responses inline...

jmathai commented 12 years ago

Can we make this a meta issue and create separate issues for the items above which don't yet exist ... and mark them all as wishlist?

cjlpa commented 12 years ago

Hi,

Yes, please! I would like to clarify then on "separate logins" - I know about the possibility of manually adding more admins as in issue 630, but what i had in mind was actually a system to allow multiple users to register (with each user having a distinctive, private collection of photos)

jmathai commented 12 years ago

215 actually let's multiple users have their own OpenPhoto site on a

single installation.

okpierre commented 12 years ago

@jmathai when I looked at 215 it is marked closed. does that mean it is something I can test using the development version?

jmathai commented 12 years ago

@okpierre OpenPhoto sites are bound to the hostname. So if a second hostname resolves to the same codebase it's essentially its own OpenPhoto site. Does that make sense? You can do this as a Virtualhost in Apache using ServerAlias.

cjlpa commented 12 years ago

That's what I meant when adding this point to the "wishlist" - I don't want to add say 1000 DNS entries to allow for 1000 users on the same installation - all users should be able to log in on http://openphoto.example.org and have their own area... just to clarify!

okpierre commented 12 years ago

Correct me if I'm wrong but the request by @cjlpa is for the creation of user accounts.

I think there is confusion between multi site and multi user. Multi site (like wordpress wpms) allows for users to create their own hosted version of openphoto off one install while multi user allows for additional user under the main admin/owner. The users each have a set limit space under each of their account to use for storage. Currently, openphoto owner and 'admins' are the same and even upload as the owner.

Something similar: https://github.com/openphoto/frontend/issues/711#issuecomment-5805044

jmathai commented 12 years ago

@okpierre I think @cjlpa is referring to each user having their own site.

and have their own area... just to clarify!

We already support multi-site via subdomains. I'm not sure we can change this though (not technically, rather philosophically). See here for details http://blog.theopenphotoproject.org/post/10537443380/namespacing-the-web-for-your-photos

It's important to note that we're not trying to build yet another photo gallery software. OpenPhoto is fundamentally different because the initial goals are different. We'll keep the discussion open but this is important to keep in mind.

ioggstream commented 12 years ago

I enabled multiple user simply adding them in the user table, but they have no write privilege. Maybe this could be enough for family websites.

jmathai commented 12 years ago

@loggstream can you clarify what you mean by multiple users? There's a bit of confusion in the terminology. Multi-user setup initially meant multiple users who have their own instance of an OpenPhoto site with a single installed codebase.

ioggstream commented 12 years ago

MultiUser: one code-base, multiple user logging in to the site.

AFAIU each site manages only one datadir: that's fine for now (just want to share my foto with my friends: I'll create them a read-only account).

ioggstream commented 12 years ago

A simple python script printing a multi-user string. Use at your own risk ;)

{{{

!/usr/bin/python

#

prints a mysql string used for creating

entries on MyOpenPhoto user table

#

from hashlib import sha1 import sys

get that value from ./src/configs/defaults.ini

salt = "change_me"

try: (mail,passw) = sys.argv[1:3] epassw = sha1(passw + "-" + salt).hexdigest()

print  """insert into mop_user(`id`,`password`,`extra`) VALUES ('%s', '%s','{"lastPhotoId":"","lastActionId":"","lastGroupId":"1","lastWebhookId":"","id":"%s","timestamp":"2011-05-18 18:58:16"}');"""  % (mail, epassw, mail)

except: print "usage: %s email password" % sys.argv[0] print exit 1 }}}

JarrydHuntley commented 11 years ago

I plus 1 this request. :) A site I could set up for my family would be great!

What does the above python script accomplish?

Thanks!

ioggstream commented 11 years ago

2013/4/4 JarrydHuntley notifications@github.com

What does the above python script accomplish?

just prints a mysql insert that adds a user account to the openphoto mysql database.

Peace, R.