MCPcopy
hub / github.com/dgraph-io/dgraph / del

Function del

acl/acl.go:162–179  ·  view source on GitHub ↗
(conf *viper.Viper)

Source from the content-addressed store, hash-verified

160}
161
162func del(conf *viper.Viper) error {
163 userId, groupId, err := getUserAndGroup(conf)
164 if err != nil {
165 return err
166 }
167 if len(userId) != 0 {
168 return userOrGroupDel(conf, userId,
169 func(ctx context.Context, txn *dgo.Txn, userId string) (AclEntity, error) {
170 user, err := queryUser(ctx, txn, userId)
171 return user, err
172 })
173 }
174 return userOrGroupDel(conf, groupId,
175 func(ctx context.Context, txn *dgo.Txn, groupId string) (AclEntity, error) {
176 group, err := queryGroup(ctx, txn, groupId)
177 return group, err
178 })
179}
180
181// AclEntity is an interface that must be met by all the types of entities (i.e users, groups)
182// in the ACL system.

Callers 1

initSubcommandsFunction · 0.85

Calls 4

getUserAndGroupFunction · 0.85
userOrGroupDelFunction · 0.85
queryUserFunction · 0.85
queryGroupFunction · 0.85

Tested by

no test coverage detected