Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-107310 / 12.0 / Set correct ACL on home dataset #5518

Merged
merged 1 commit into from Aug 20, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions tests/api2/user.py
Expand Up @@ -32,6 +32,30 @@
"~/.ssh/authorized_keys": "0o100600",
}

home_acl = [
{
"tag": "owner@",
"id": None,
"type": "ALLOW",
"perms": {"BASIC": "FULL_CONTROL"},
"flags": {"BASIC": "INHERIT"}
},
{
"tag": "group@",
"id": None,
"type": "ALLOW",
"perms": {"BASIC": "FULL_CONTROL"},
"flags": {"BASIC": "INHERIT"}
},
{
"tag": "everyone@",
"id": None,
"type": "ALLOW",
"perms": {"BASIC": "TRAVERSE"},
"flags": {"BASIC": "NOINHERIT"}
},
]


def test_01_get_next_uid():
results = GET('/user/get_next_uid/')
Expand Down Expand Up @@ -245,6 +269,16 @@ def test_30_creating_home_dataset():
results = POST("/pool/dataset/", payload)
assert results.status_code == 200, results.text

results = POST(
f'/pool/dataset/id/{dataset_url}/permission/', {
'acl': home_acl,
}
)
assert results.status_code == 200, results.text
perm_job = results.json()
job_status = wait_on_job(perm_job, 180)
assert job_status['state'] == 'SUCCESS', str(job_status['results'])


@pytest.mark.dependency(name="USER_CREATED")
def test_31_creating_user_with_homedir(request):
Expand Down