1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

bitbake: hashserv: server: Add owner if user is logged in

If a user is authenticated with the server, report them as the owner of
a report

(Bitbake rev: a9fd4a45bb6e5ac9832835897f594f3bbf67e1aa)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Watt
2023-11-03 08:26:40 -06:00
committed by Richard Purdie
parent 33cde47e10
commit 95481c8668
2 changed files with 12 additions and 0 deletions
+9
View File
@@ -828,6 +828,15 @@ class HashEquivalenceCommonTests(object):
for col in columns:
self.client.remove({col: ""})
def test_auth_is_owner(self):
admin_client = self.start_auth_server()
user = self.create_user("test-user", ["@read", "@report"])
with self.auth_client(user) as client:
taskhash, outhash, unihash = self.create_test_hash(client)
data = client.get_taskhash(self.METHOD, taskhash, True)
self.assertEqual(data["owner"], user["username"])
class TestHashEquivalenceClient(HashEquivalenceTestSetup, unittest.TestCase):
def get_server_addr(self, server_idx):