Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
nkvuong committed Mar 29, 2023
1 parent 003f22f commit fa81de6
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions permissions/resource_permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,6 @@ func (a PermissionsAPI) Update(objectID string, objectACL AccessControlChangeLis
PermissionLevel: "CAN_MANAGE",
})
}
w, err := a.client.WorkspaceClient()
if err != nil {
return err
}
if strings.HasPrefix(objectID, "/sql/warehouses") {
warehouse, err := w.Warehouses.GetById(a.context, strings.ReplaceAll(objectID, "/sql/warehouses/", ""))
if err != nil {
return err
}
// add CAN_MANAGE permission for creator
objectACL.AccessControlList = append(objectACL.AccessControlList, AccessControlChange{
UserName: warehouse.CreatorName,
PermissionLevel: "CAN_MANAGE",
})
}
if strings.HasPrefix(objectID, "/jobs") || strings.HasPrefix(objectID, "/pipelines") {
owners := 0
for _, acl := range objectACL.AccessControlList {
Expand Down

0 comments on commit fa81de6

Please sign in to comment.