Use workspace permissions to limit project viewability

This commit is contained in:
Montana 2018-10-04 14:24:35 -04:00
parent e5753762fa
commit 55394b65db
2 changed files with 7 additions and 3 deletions

View File

@ -120,7 +120,6 @@ WORKSPACE_ROLES = [
"permissions": [
Permissions.VIEW_USAGE_REPORT,
Permissions.VIEW_WORKSPACE,
Permissions.VIEW_APPLICATION_IN_WORKSPACE,
],
},
{
@ -131,7 +130,6 @@ WORKSPACE_ROLES = [
Permissions.VIEW_USAGE_REPORT,
Permissions.VIEW_USAGE_DOLLARS,
Permissions.VIEW_WORKSPACE,
Permissions.VIEW_APPLICATION_IN_WORKSPACE,
],
},
{
@ -143,7 +141,6 @@ WORKSPACE_ROLES = [
Permissions.VIEW_ASSIGNED_CSP_ROLE_CONFIGURATIONS,
Permissions.VIEW_ATAT_PERMISSIONS,
Permissions.VIEW_WORKSPACE,
Permissions.VIEW_APPLICATION_IN_WORKSPACE,
],
},
]

View File

@ -167,6 +167,13 @@ def test_scoped_workspace_only_returns_a_users_projects_and_environments(
"My project",
["dev", "staging", "prod"],
)
Projects.create(
workspace_owner,
workspace,
"My Project 2",
"My project 2",
["dev", "staging", "prod"],
)
developer = UserFactory.from_atat_role("developer")
dev_environment = Environments.add_member(
new_project.environments[0], developer, "developer"