mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Add command to manage access to Docker configs
This commit is contained in:
parent
8d0bd7bc41
commit
ac62dae890
@ -16,6 +16,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- `setting get` command to get configuration options.
|
||||
- `setting list|ls` command to print configuration options.
|
||||
- `--format` flag to select output format from "table", "json" or a custom Go template. Defaults to "table".
|
||||
- `config access` command to set access control for configs.
|
||||
- `--admins` flag to limit access to administrators.
|
||||
- `--private` flag to limit access to current user.
|
||||
- `--public` flag to give access to all users.
|
||||
- `container access` command to set access control for containers.
|
||||
- `--admins` flag to limit access to administrators.
|
||||
- `--private` flag to limit access to current user.
|
||||
|
@ -1,6 +1,10 @@
|
||||
FROM alpine:3.10
|
||||
|
||||
ENV PSU_AUTH_TOKEN=""
|
||||
ENV PSU_CONFIG_ACCESS_ADMINS=""
|
||||
ENV PSU_CONFIG_ACCESS_ENDPOINT=""
|
||||
ENV PSU_CONFIG_ACCESS_PRIVATE=""
|
||||
ENV PSU_CONFIG_ACCESS_PUBLIC=""
|
||||
ENV PSU_CONTAINER_ACCESS_ADMINS=""
|
||||
ENV PSU_CONTAINER_ACCESS_ENDPOINT=""
|
||||
ENV PSU_CONTAINER_ACCESS_PRIVATE=""
|
||||
|
15
cmd/config.go
Normal file
15
cmd/config.go
Normal file
@ -0,0 +1,15 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// configCmd represents the config command
|
||||
var configCmd = &cobra.Command{
|
||||
Use: "config",
|
||||
Short: "Manage configs",
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(configCmd)
|
||||
}
|
10
cmd/configAccess.go
Normal file
10
cmd/configAccess.go
Normal file
@ -0,0 +1,10 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/greenled/portainer-stack-utils/client"
|
||||
"github.com/greenled/portainer-stack-utils/common"
|
||||
)
|
||||
|
||||
func init() {
|
||||
common.AccessCmdInitFunc(configCmd, client.ResourceConfig)
|
||||
}
|
Loading…
Reference in New Issue
Block a user