CloudKit security roles

I’d like the ability to detect a users security role. This makes sense for detecting the roles assigned to named users for enabling workflows within an app.

For example, user generated content and “moderators”. Instead of building an unlisted app, I’d prefer to just check permissions against the user.

As a workaround, one could create record types with the same “security role” as the moderator actions, but to attempt to fetch a dummy record seems fragile and inefficient.

FB9638492 (CloudKit: API to detect provided security role on current user)

Answered by Engineer in 890799022

Thanks for filing the Feedback Request! This is an interesting use of Security Roles for Public Database. We will review it and reply there. If you can, it would be helpful to understand how you envision this API working and add it to the FB.

I'd assume you'd need to request the current logged-in user "User" record type, so a round trip might still be required. Your workaround might not be far-off from a potential solution.

Thanks for filing the Feedback Request! This is an interesting use of Security Roles for Public Database. We will review it and reply there. If you can, it would be helpful to understand how you envision this API working and add it to the FB.

I'd assume you'd need to request the current logged-in user "User" record type, so a round trip might still be required. Your workaround might not be far-off from a potential solution.

CloudKit security roles
 
 
Q