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

Discussion: How to become a Teleframe-Admin #148

Open
LuHKae opened this issue Nov 23, 2020 · 3 comments
Open

Discussion: How to become a Teleframe-Admin #148

LuHKae opened this issue Nov 23, 2020 · 3 comments

Comments

@LuHKae
Copy link
Contributor

LuHKae commented Nov 23, 2020

Becourse of the editor free configuration it is in my opinion mandatory that at least one administrator is named for each TeleFrame installation. I would like to discuss with you how we can approach this.

Because it may be possible to manipulate the system with root privileges via the admin functions, it must be ensured that no stranger can become an admin.

My plan is to enable the frist sender of '/start' as admin during the setup of the teleframe.
In my eyes this should fit for all new installations.

More complicated is this topic for active installations. In my eyes there is no way to automatically query the admin.
I see three different ways on how this task could be acomplished:

  1. After the update the first ID from whitelistChats becomes admin, which sends '/start'
  2. After the update the ID from whitelistChats[0] is Admin
  3. Don't let the bot start again if no admin has been maintained.

At the moment I think the best solution is a mix out of 1) and 2).
If no admin has be configured so far, the bot will only start for a short time. Then the admin has this timeperiode to send his '/start' command, if he doesn't do that, the bot will terminate automatically.

What do you think about this?

@LukeSkywalker92
Copy link
Owner

First of all...Nice Job 👍

I like your suggestions and would vote for it if there are no arguments against it? @gegu ?

@gegu
Copy link
Collaborator

gegu commented Nov 27, 2020

Yes, I also think the idea of administration via chat is great.

However, it should definitely be possible to deactivate the feature and not necessarily pre-set it. Especially if we entered the security aspect.

For new installations the installer can ask if you want to use the feature and if the first chat id should be entered as admin in the whitelist. I would like that.

For existing installations, the update script may display a message during the update, telling you what to do to activate the feature. Here it would be conceivable that a script offers support for the subsequent activation/deactivation of the feature.
We could e.g. create a sempahore file in the config directory to see if the next /start should define the admin - or which idea comes up. We could also implement a special command instead of /start to define the admin while the file exists.

Which I don't like when nothing works after an update, when there is no admin defined for a feature I might not want to use. I have installations running where I definitely don't want to.

I am available for further discussions on implementation. In about two weeks I have vacation and then some time to work on TeleFrame.

@gegu
Copy link
Collaborator

gegu commented Nov 27, 2020

Which I don't like when nothing works after an update, when there is no admin defined for a feature I might not want to use. I have installations running where I definitely don't want to.

Sorry, what I wrote here was nonsense. I have misinterpreted this 😟

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