Allow target type field to be included in an update. (#412)
This commit is contained in:
1 parent
2f8d7f0a32
commit
278902db1a
4 files changed
+10
-21
No files matched your search
@@ -365,7 +365,7 @@ func validateUpdateRequest(req *pbs.UpdateAuthMethodRequest) error {
|
||||
switch auth.SubtypeFromId(req.GetId()) {
|
||||
case auth.PasswordSubtype:
|
||||
if req.GetItem().GetType() != "" && auth.SubtypeFromType(req.GetItem().GetType()) != auth.PasswordSubtype {
|
||||
badFields["type"] = "Cannot modify resource type."
|
||||
badFields["type"] = "Cannot modify the resource type."
|
||||
}
|
||||
pwAttrs := &pb.PasswordAuthMethodAttributes{}
|
||||
if err := handlers.StructToProto(req.GetItem().GetAttributes(), pwAttrs); err != nil {
|
||||
|
||||
Reference in new issue
Block a user