@@ -69,45 +69,3 @@ func (s *FakeWorkspace) SchemasUpdate(req Request, name string) Response {
6969 Body : existing ,
7070 }
7171}
72-
73- /*
74- func (s *FakeWorkspace) SchemasUpdateGrants(req Request, fullName string) Response {
75- var request catalog.UpdatePermissions
76- if err := json.Unmarshal(req.Body, &request); err != nil {
77- return Response{
78- StatusCode: http.StatusBadRequest,
79- Body: fmt.Sprintf("request parsing error: %s", err),
80- }
81- }
82- defer s.LockUnlock()()
83-
84- // For simplicity, we'll just replace all grants (similar to how job permissions work)
85- var grants []catalog.PrivilegeAssignment
86- for _, change := range request.Changes {
87- if len(change.Add) > 0 {
88- grants = append(grants, catalog.PrivilegeAssignment{
89- Principal: change.Principal,
90- Privileges: change.Add,
91- })
92- }
93- }
94- s.SchemasGrants[fullName] = grants
95-
96- return Response{
97- Body: catalog.GetPermissionsResponse{
98- PrivilegeAssignments: grants,
99- },
100- }
101- }
102-
103- func (s *FakeWorkspace) SchemasGetGrants(req Request, fullName string) Response {
104- defer s.LockUnlock()()
105-
106- grants := s.SchemasGrants[fullName]
107- return Response{
108- Body: catalog.GetPermissionsResponse{
109- PrivilegeAssignments: grants,
110- },
111- }
112- }
113- */
0 commit comments