eugenegujing opened a new issue, #6397:
URL: https://github.com/apache/texera/issues/6397

   ### Task Summary
   
   
`file-service/src/main/scala/org/apache/texera/service/resource/DatasetAccessResource.scala`
 implements dataset sharing, but its sharing surface has zero test coverage: 
nothing in the test tree calls `grantAccess`, `revokeAccess`, or 
`getAccessList`, and the grantee privilege matrix is untested — the existing 
`DatasetResourceSpec` only exercises the two extremes indirectly (the owner, 
and a user with no access), while `DatasetResourcePermissionsSpec` pins role 
annotations on a different class. Add a ScalaTest spec using the existing 
`MockTexeraDB` pattern that verifies grantAccess followed by getAccessList 
shows the grantee with the granted privilege and that re-granting with a 
different privilege updates it, that revokeAccess removes the grantee from the 
list, that `getOwnerEmailOfDataset` returns the owner's email, that a READ 
grantee passes `userHasReadAccess` but fails `userHasWriteAccess` while a WRITE 
grantee passes both (with `getDatasetUserAccessPrivilege` returning READ
  and WRITE respectively), and that a public dataset is readable via 
`isDatasetPublic`/`userHasReadAccess` by a user with no explicit grant while a 
private one is not.
   
   ### Task Type
   
   - [ ] Refactor / Cleanup
   - [ ] DevOps / Deployment / CI
   - [x] Testing / QA
   - [ ] Documentation
   - [ ] Performance
   - [ ] Other


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to