Skip to content

Commit

Permalink
add file generated flag
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBurchLog committed Jun 4, 2024
1 parent f31dc46 commit 5fb7344
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions brewtils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions brewtils/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)



Expand Down
3 changes: 3 additions & 0 deletions brewtils/test/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ def role_dict():
"scope_versions": [],
"scope_commands": [],
"protected": False,
"file_generated": False,
}


Expand All @@ -598,6 +599,7 @@ def remote_role_dict():
"scope_versions": [],
"scope_commands": [],
"protected": False,
"file_generated": False,
}


Expand All @@ -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,
}


Expand Down

0 comments on commit 5fb7344

Please sign in to comment.