@cbaker6, if I may ask… I now face the same just in ParseSwift SDK. As far I investigated, there is not direct method to extract array of objectIds. I did trick it in this way:
let encoder = group.getJSONEncoder()
var participantsIds: [String] = []
if let acl = group.ACL, let descriptionData = try? encoder.encode(acl) {
//Coding ACL back to data
if let decodedACL = try? JSONDecoder().decode([String : [String:Bool]].self, from: descriptionData) {
//Decoding and extracting the keys
let keys = decodedACL.keys
participantsIds.append(contentsOf: keys)
}
}
The reason why I want to achieve this functionality is to spare “participants” array field in an ParseObject, because the participant will be always the users that have ACL set and there is no public read on that ParseObject
You mean to add it to the ParseSwift SDK? Sure I can make a PR for that.
No, I wouldn’t add this to the Swift SDK. You can do this in your own app.
I wouldn’t add this to the SDK until there is a consensus from the server team and others that this isn’t a security issue by letting a user see all of the objectId’s who have access to an object. I would guess there’s some reasoning why the ACL list is setup the way it is.