Describe in detail what your merge request does and why.
This PR adds in the db, model, and service layer for namespace bot accounts.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other pull requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Create a new account for IRIDA next from the UI, login, and create a project
Open rails console in the terminal
Set the following user = User.last, proj_namespace = Namespaces::ProjectNamespace.last, params = {"token_name": "Uploader", "scopes":["read_api", "api"], "access_level":20}
Run Bots::CreateService.new(user, proj_namespace, params).execute
Verify that a new user was created with a user_type of 1 which is a project_bot
Verify that the user is linked to the namespace via NamespaceBot
Set the last NamespaceBot to a variable
Run `Bots::DestroyService.new(VARIABLE_FROM_STEP_7, proj_namespace, user)
Verify that the NamespaceBot was destroyed and the underlying user from the users table. Also verify that the namespace is not deleted.
PR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
What does this PR do and why?
Describe in detail what your merge request does and why.
This PR adds in the db, model, and service layer for namespace bot accounts.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other pull requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
user = User.last
,proj_namespace = Namespaces::ProjectNamespace.last
,params = {"token_name": "Uploader", "scopes":["read_api", "api"], "access_level":20}
Bots::CreateService.new(user, proj_namespace, params).execute
1
which is aproject_bot
NamespaceBot
to a variableusers
table. Also verify that the namespace is not deleted.PR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.