(conf *viper.Viper)
| 160 | } |
| 161 | |
| 162 | func 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. |
no test coverage detected