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

Allow different access_token logins based on project #60

Closed
smoebody opened this issue Feb 17, 2022 · 8 comments
Closed

Allow different access_token logins based on project #60

smoebody opened this issue Feb 17, 2022 · 8 comments

Comments

@smoebody
Copy link

smoebody commented Feb 17, 2022

Hi,

first of all thanks for the maubot, especially the gitlab-plugin.

Now i am setting up multiple rooms where the bot shall keep the members updated about a different project. Therefore i tried to login to the gitlab-server multiple times (from each room with the projects access_token only to find out that i can login to a server only once.

sqlite3.IntegrityError: UNIQUE constraint failed: token.user_id, token.gitlab_server

To allow one bot to manage multiple projects on one server it is necessary to give the bot an access_token created for a user who is able to access all these projects. This is suboptimal in my opinion.
Instead i wish for the ability to link a room to a specific access_token (if specified). Also in order to keep members in other rooms from messing up projects they don't belong to.

I am not familar with python, although I can offer to test.

cheers,
smoe

@tulir
Copy link
Member

tulir commented Feb 17, 2022

Logging in is per-user, not per-room

@smoebody
Copy link
Author

smoebody commented Feb 17, 2022

I know.
I suggest to change that.

@tulir
Copy link
Member

tulir commented Feb 17, 2022

Room-wide logins sound dangerous and not particularly useful. Each user can log in with their own token.

@smoebody
Copy link
Author

Im afraid i do not understand.
You mean, when i invite the bot to a room and login to a gitlab server, only I are able to run !gitlab-commands?

@tulir
Copy link
Member

tulir commented Feb 17, 2022

Yes, that's what I mean by login being per-user. After you login in a private chat with the bot, you can use the bot commands in any room. Nobody else can use commands unless they log in with their own tokens.

@smoebody
Copy link
Author

Ah, ok. Thanks for the enlightment. Then it all makes sense of course.

But the messages the Bot posts in a room are visible to all members?

@tulir
Copy link
Member

tulir commented Feb 17, 2022

Yes, webhook messages are visible to everyone. They can also be set up manually without logging in (from the gitlab web interface)

@smoebody
Copy link
Author

All right. Thanks. Closing.

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

2 participants