Add and use permission table, update CLI and README.md
This commit is contained in:
38
README.md
38
README.md
@@ -247,8 +247,39 @@ ddns-service user passwd myuser
|
||||
ddns-service user email myuser new@example.com
|
||||
```
|
||||
|
||||
### Permission Management
|
||||
|
||||
Permissions control which hostnames users can update.
|
||||
|
||||
```bash
|
||||
# List all permissions
|
||||
ddns-service permission list
|
||||
|
||||
# List permissions for specific user
|
||||
ddns-service permission list --user myuser
|
||||
|
||||
# Add permission for exact hostname
|
||||
ddns-service permission add myuser mypc dyn.example.com
|
||||
|
||||
# Add wildcard permission (any hostname in zone)
|
||||
ddns-service permission add myuser '*' dyn.example.com
|
||||
|
||||
# Add suffix wildcard (e.g., *.home matches foo.home, bar.home)
|
||||
ddns-service permission add myuser '*.home' dyn.example.com
|
||||
|
||||
# Delete permission
|
||||
ddns-service permission delete myuser mypc dyn.example.com
|
||||
```
|
||||
|
||||
**Pattern matching:**
|
||||
- `*` - matches any hostname in the zone
|
||||
- `*.suffix` - matches hostnames ending in `.suffix` (recursive)
|
||||
- `exact` - matches only that exact hostname
|
||||
|
||||
### Hostname Management
|
||||
|
||||
Hostnames are auto-created when users with permission send their first update.
|
||||
|
||||
```bash
|
||||
# List all hostnames
|
||||
ddns-service hostname list
|
||||
@@ -256,13 +287,6 @@ ddns-service hostname list
|
||||
# List hostnames for specific user
|
||||
ddns-service hostname list --user myuser
|
||||
|
||||
# Add hostname
|
||||
ddns-service hostname add myuser mypc dyn.example.com
|
||||
|
||||
# Add hostname with custom TTLs
|
||||
ddns-service hostname add myuser mypc dyn.example.com \
|
||||
--dns-ttl 60 --expiry-ttl 7200
|
||||
|
||||
# Modify hostname TTLs
|
||||
ddns-service hostname modify mypc dyn.example.com --dns-ttl 120
|
||||
|
||||
|
||||
Reference in New Issue
Block a user