Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to link users to applications? #334

Closed
2 of 6 tasks
wsw70 opened this issue Jun 23, 2020 · 4 comments
Closed
2 of 6 tasks

How to link users to applications? #334

wsw70 opened this issue Jun 23, 2020 · 4 comments
Labels
question Further information is requested

Comments

@wsw70
Copy link

wsw70 commented Jun 23, 2020

Have you read the documentation?

  • Yes, but it does not include related information regarding my question.
  • Yes, but the steps described in the documentation do not work on my machine.
  • Yes, but I am having difficulty understanding it and wants clarification.

You are setting up gotify in

  • Docker
  • Linux native platform
  • Windows native platform

Describe your problem

I use Gotify as a single user:

  • send messages from my applications via the REST API using the application token
  • receive messages on my Android phone, on which I logged in as the user admin

This works great.

I now would like to expand the use to some other people. Let's imagine an application which sends a message to Gotify when a hardware button is pressed. I would like this message to reach two other clients (new clients - say the phones of my children) but not mine.

In other words, there is an app MomIsCalling defined in Gotify (with its own API token) and I would like user kid1 and kid2 to receive it. And only that one - not messages from the application Monitoring (which I listen to).

How can I do this? Specifically - where in the UI can I find the place where I link users and applications?

@wsw70 wsw70 added the question Further information is requested label Jun 23, 2020
@jmattheis
Copy link
Member

This is currently not possible and doesn't fit in the current database schema, thus, requiring a major rewrite of gotify.

@wsw70
Copy link
Author

wsw70 commented Jun 24, 2020

OK, thanks for the follow-up. Just to make it clear for me: it means that all the users defined in Gotify will always get the same set of messages? (including the streams which are created after they logged on the first time, like to the admin account).

So the alternative for a multi-user deployment where each of them would get at personalized set of messages would be to have one instance of gotify per user? (and then either multiple messages from the source application - one for each instance, or some kind of intermediate API that would dispatch one message to the instances, based on the message)

@jmattheis
Copy link
Member

Have a look at https://gotify.net/docs/

each user only sees messages for application that they've created. You can create multiple users they don't share messages.

@wsw70
Copy link
Author

wsw70 commented Jun 24, 2020

I should not have skipped the Intro part :)

Users are only able to manage (view/edit/delete) clients and applications (includes messages sent by the app) that they've created.

Thanks for the pointer. This means that in my case I will have the user create their apps, and I will one message to each of them. This solves a lot of the cases I have when I control the service which sends the notifications.

I still have the problem of a service I do not control (= on which I can configure only one notifier) and I think I will write a "dispatcher" of sorts for these cases (which will dispatch one single message to several users, on their own apps).

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Development

No branches or pull requests

2 participants