pentacent / keila

Open Source Newsletter Tool.
https://keila.io
GNU Affero General Public License v3.0
1.33k stars 69 forks source link

Add Shared Projects #156

Open ja2ui0 opened 1 year ago

ja2ui0 commented 1 year ago

Unless I'm missing something, projects are specific to the user. Therefore, multiple users managing a project would have to share a login to access the same contacts / segments / campaigns.

It would be useful for multiple users with their own credentials to be able to manage projects collaboratively.

wmnnd commented 1 year ago

Keila is already set up to allow this; projects are tied to an entity called "account" and not the user entity. Weโ€™re just missing a UI to manage the shared access to a project.

@ja2ui0: Would you be willing to help with this issue?

ja2ui0 commented 1 year ago

@wmnnd: I'm not unwilling, it will take me time I don't have at the moment considering other commitments. I'm not a coder or a UI / UX designer, but when things settle down a little bit in a couple of weeks I might be able to have a look.

harryfear commented 11 months ago

For now, how can we manually edit the database to enable 2 users to share a project, please?

harryfear commented 11 months ago

A row should be added to user_groups with the user_id (set as per the user to whom to delegate project access to) and the group_id (set as per the group_id of the Project in question in projects). The id, inserted_at and updated_at fields also need setting on insertion.

But that isn't enough; doing only the above causes the delegated user to encounter a 500 fatal issue after starting a campaign send-out:

14:05:47.979 [error] #PID<0.29160.0> running KeilaWeb.Endpoint (connection #PID<0.29159.0>, stream id 1) terminated
Server: email.domain.co.uk:80 (http)
Request: GET /projects/np_XXXXXX/campaigns/nmc_YYYYYY/stats
** (exit) an exception was raised:
    ** (KeyError) key :id not found in: nil. If you are using the dot syntax, such as map.field, make sure the left-hand side of the dot is a map
wmnnd commented 10 months ago

@harryfear Do all the other routes work though?

harryfear commented 10 months ago

@wmnnd Yes, they do! It's just the on-send route and the stats routes that don't seem to work ๐Ÿ˜Š

verymilan commented 6 months ago

Would be amazing if this feature would become an actual thing one day - this actually kinda took me by surprise. ๐Ÿ˜‡ Would already be helpful if those missing things under the hood would be implemented, as i could get around the missing frontend stuff (but perhaps other users won't). :)

jlxq0 commented 6 months ago

I strongly support this. Would be happy to either have a UI or a supported way on the command line or db.