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

Dynamic Authorization/Deauthorization #99

Closed
bonastreyair opened this issue Feb 11, 2020 · 8 comments
Closed

Dynamic Authorization/Deauthorization #99

bonastreyair opened this issue Feb 11, 2020 · 8 comments

Comments

@bonastreyair
Copy link
Contributor

bonastreyair commented Feb 11, 2020

Hi!

Is there a way to dynamically authorise/deauthorise users from the configuration node of a TelegramBot or it is just static configuration that can only be modified manually?

I tried to add {{context.global.authorised_telegram_users}} (which is a list of the usernames that I set before in the Node-RED global context) but I can't make it work...
Screenshot 2020-02-11 at 19 33 33
Screenshot 2020-02-11 at 19 32 02

If there is no way to do it right now, I think it would be awesome to add this functionality.
I'm using version 7.1.1 in Node-RED 1.0.3.

Thanks!

@windkh
Copy link
Owner

windkh commented Feb 11, 2020

Hi @bonastreyair right now this configuration is a static one. I can add this dynamic thing if you want to, but I don‘t really understand the use case behind that. Can you give me a little hint ?

@bonastreyair
Copy link
Contributor Author

Hi, thanks for your quick response!

Imagine you create an aplication for a little company, they want to be able to add or revoke the authorised users to have access to the commands (for checking the temperature in a room for example) but you can't let them modify the Node-RED application.

So I think (for example) sending a configuration email (or whatever other comunication mean), recieved in Node-RED and treated in a way, so that automatically changes the Telegram configuration node to add or remove a "user_name" from the authorised list. Doing so the little company could handle the authorisation of the access of the commands without entering the Node-RED application. In this case I understand that Node-RED should catch the new configuration without the need to "redeploy" anything.

I hope I could explain the "case" I have in mind. What do you think? :)

Thanks!

@windkh
Copy link
Owner

windkh commented Feb 11, 2020

That is understood. I wonder how that can be implemented... give me some hours to rethink that. Thanks for providing that idea...

@Swiftnesses
Copy link

This sounds awesome, would love to see it implemented ;-)

windkh added a commit that referenced this issue Mar 29, 2020
@windkh
Copy link
Owner

windkh commented Mar 29, 2020

version 7.2.0 support that feature

@windkh windkh closed this as completed Mar 29, 2020
@windkh
Copy link
Owner

windkh commented Mar 29, 2020

hope it works guys

@bonastreyair
Copy link
Contributor Author

I will check it out as soon as I can! You are awesome! Thanks!

@windkh
Copy link
Owner

windkh commented Mar 29, 2020

de nada

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants