diff --git a/README.md b/README.md index 495cf87..559df52 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ SPDX-License-Identifier: CC0-1.0 ## maubot-osc +![status-badge](https://ci.dennogumi.org/api/badges/einar/maubot-osc/status.svg) + `maubot-osc` is a simple [maubot](https://maubot.xyz/) plugin to query an [Open Build Service](https://openbuildservice.org/) instance. Basically it replicates a few of the features of the `osc` command line tool used to interact with the OBS. ### Features @@ -21,6 +23,7 @@ These are in addition to what maubot requires by itself. - lxml - jinja2 +- [cryptocode](https://github.com/gdavid7/cryptocode) ### Installation @@ -34,6 +37,7 @@ Then you need to modify a few configuration parameters for your instance: - `trigger_token`: An OBS access token with the `runservice` capability. See "Creating tokens" below. - `rebuild_token`: An OBS access token with the `rebuild` capability. See "Creating tokens" below. - `secret`: A random string used to encrypt the password in the configuration file. +- `acl`: User IDs (`@user:homeserver.com`) which are allowed to interact with the bot. See "Access control lists" below. ### Creating tokens @@ -59,9 +63,26 @@ Save both tokens in the configuration. Should you need to, you can view them lat Make sure your bot instance is in a room (refer to the maubot docs for how) and then type `!osc help` for help. +### Access control lists (ACLs) + +By default, no user is allowed to perform any operation. You need to change the `acl` section of the configuration to add user IDs (`@user:homeserver.com`) allowed to interact with the bot. Users in the `admin` list have full powers over the bot, while users in the `user` list can only perform read-only (e.g. status querying) actions. + +This example shows how it works in practice: + +```yaml +acl: + admin: + # Fred and Sue will be able to perform all commands + - @fred:myhome.com + - @sue:otherserver.com + user: + # Phil will only be able to run read-only (status, etc.) commands + - @phil:elsewhere.com +``` + ### Notice -I made this in about three or four hours for my own use. Don't expect high quality code or a lot of polish. +I made this for my own use. Don't expect high quality code or a lot of polish. ### License