docs: user registration (#1925)

Further to discussion on [discord](https://discord.com/channels/838698813463724034/838698813463724037/1125412378125803612).

The docs should be clearer about:
- user registration in general, and 
- preventing registration of random users but allowing specific ones.

---------

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
lonix1 2023-07-07 05:31:19 +02:00 committed by GitHub
parent 94f2331a4c
commit 45319b24cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,10 +2,45 @@
## User registration
Registration is closed by default. While disabled an administrator needs to add new users manually (exp. `woodpecker-cli user add`).
Woodpecker does not have its own user registry; users are provided from your [forge](./11-forges/10-overview.md) (using OAuth2).
If registration is open every user with an account at the configured [forges](./11-forges/10-overview.md) can login to Woodpecker.
This example enables open registration for users that are members of approved organizations:
Registration is closed by default (`WOODPECKER_OPEN=false`). If registration is open (`WOODPECKER_OPEN=true`) then every user with an account at the configured forge can login to Woodpecker.
To open registration:
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
[...]
environment:
- [...]
+ - WOODPECKER_OPEN=true
```
You can **also restrict** registration, by keep registration closed and ...
... **adding** new **users manually** via the CLI: `woodpecker-cli user add`, or
... allowing specific **admin users** via the `WOODPECKER_ADMIN` setting, or
by open registration and **filter by organization** membership through the `WOODPECKER_ORGS` setting.
### To close registration, but allow specific admin users
```diff
# docker-compose.yml
version: '3'
services:
woodpecker-server:
[...]
environment:
- [...]
+ - WOODPECKER_OPEN=false
+ - WOODPECKER_ADMIN=johnsmith,janedoe
```
### To only allow registration of users, who are members of approved organizations
```diff
# docker-compose.yml
@ -18,7 +53,6 @@ services:
- [...]
+ - WOODPECKER_OPEN=true
+ - WOODPECKER_ORGS=dolores,dogpatch
```
## Administrators