diff --git a/brewtils/models.py b/brewtils/models.py index b7ac64fb..afafa7b1 100644 --- a/brewtils/models.py +++ b/brewtils/models.py @@ -1622,11 +1622,12 @@ def __init__( password=None, roles=None, local_roles=None, - remote_roles=None, - is_remote=False, + remote_roles=None, remote_user_mapping=None, metadata=None, + is_remote=False, protected=False, + file_generated=False, ): self.id = id self.username = username @@ -1638,6 +1639,7 @@ def __init__( self.remote_user_mapping = remote_user_mapping or [] self.metadata = metadata self.protected = protected + self.file_generated = file_generated def __str__(self): return "%s: %s" % (self.username, self.roles) @@ -1672,6 +1674,7 @@ def __init__( scope_versions=None, scope_commands=None, protected=False, + file_generated=False, ): self.permission = permission or "READ_ONLY" self.description = description @@ -1684,6 +1687,7 @@ def __init__( self.scope_versions = scope_versions or [] self.scope_commands = scope_commands or [] self.protected = protected + self.file_generated = file_generated def __str__(self): return "%s" % (self.name) diff --git a/brewtils/schemas.py b/brewtils/schemas.py index f4d3269f..470f07b3 100644 --- a/brewtils/schemas.py +++ b/brewtils/schemas.py @@ -572,6 +572,7 @@ class RoleSchema(BaseSchema): scope_versions = fields.List(fields.Str(), allow_none=True) scope_commands = fields.List(fields.Str(), allow_none=True) protected = fields.Boolean(allow_none=True) + file_generated = fields.Boolean(allow_none=True) class RemoteRoleSchema(RoleSchema): pass @@ -607,6 +608,7 @@ class UserSchema(BaseSchema): is_remote = fields.Boolean(allow_none=True) metadata = fields.Dict(allow_none=True) protected = fields.Boolean(allow_none=True) + file_generated = fields.Boolean(allow_none=True) diff --git a/brewtils/test/fixtures.py b/brewtils/test/fixtures.py index 09a845b1..85b89937 100644 --- a/brewtils/test/fixtures.py +++ b/brewtils/test/fixtures.py @@ -577,6 +577,7 @@ def role_dict(): "scope_versions": [], "scope_commands": [], "protected": False, + "file_generated": False, } @@ -598,6 +599,7 @@ def remote_role_dict(): "scope_versions": [], "scope_commands": [], "protected": False, + "file_generated": False, } @@ -619,6 +621,7 @@ def user_dict(role_dict, remote_role_dict, remote_user_map_dict): "is_remote": False, "metadata": {}, "protected": False, + "file_generated": False, }