Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gitpod-io
GitHub Repository: gitpod-io/gitpod
Path: blob/main/dev/gpctl/cmd/users-block.go
2498 views
1
// Copyright (c) 2020 Gitpod GmbH. All rights reserved.
2
// Licensed under the GNU Affero General Public License (AGPL).
3
// See License.AGPL.txt in the project root for license information.
4
5
package cmd
6
7
import (
8
"context"
9
10
"github.com/spf13/cobra"
11
)
12
13
// usersBlockCmd represents the describe command
14
var usersBlockCmd = &cobra.Command{
15
Use: "block <userID> ... <userID>",
16
Short: "blocks a user",
17
Args: cobra.MinimumNArgs(1),
18
Run: func(cmd *cobra.Command, args []string) {
19
ctx, cancel := context.WithCancel(context.Background())
20
defer cancel()
21
blockUser(ctx, args, true)
22
},
23
}
24
25
func init() {
26
usersCmd.AddCommand(usersBlockCmd)
27
}
28
29